title: Is it normal to have two elements with same id in two div elements with other id?
body: <p>I know, that two elements can't hav the same id. But it's happens so, that in my project I have two elements with same id in other divs, like this</p>
  <pre><code>&lt;div id=&quot;div1&quot;&gt;
       &lt;img id=&quot;loading&quot; /&gt;
  &lt;/div&gt;
  &lt;div id=&quot;div2&quot;&gt;
       &lt;img id=&quot;loading&quot; /&gt;
  &lt;/div&gt;
  </code></pre>
  <p>And CSS:</p>
  <pre><code>#div1 #loading
  {
      some style here...
  }
  #div2 #loading
  {
      another style here...
  }
  </code></pre>
  <p>Works fine for me, but maybe it is not reccomended to do by so?</p>
  <p>Yes, I know, thet I can use classes, and it's strongly recomended to do by so, but I want to know is there any potential risk in this usage of id?
  I think no, because when I wrote for example</p>
  <p><code>$(&quot;#div1 #loading&quot;)...</code> it becomes a unique element.
  Isn't it?</p>