title: How to change CSS style for all of any specific element tag in outer div only?
body: <p>Let say I've below HTML code, Here I just want to change the color <code>&lt;a&gt;</code> element tag in outer div <code>#my_div_1</code> only.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;style&gt;
  #my_div_1 a{
      color: red;
  }
  &lt;/style&gt;
  
  &lt;div id="my_div_1"&gt;
  
      &lt;a href="#"&gt;change the colour &lt;/a&gt;&lt;br&gt;
      &lt;a href="#"&gt;change the colour &lt;/a&gt;&lt;br&gt;      
      &lt;b&gt; Not change my colour&lt;/b&gt;&lt;br&gt;            
  
      &lt;div id="my_div_2"&gt;
          &lt;a href="#"&gt;Not change my colour &lt;/a&gt;&lt;br&gt;
          &lt;a href="#"&gt;Not change my colour &lt;/a&gt;&lt;br&gt;
      &lt;/div&gt;  
  
      &lt;a href="#"&gt;change the colour &lt;/a&gt;  &lt;br&gt;        
      &lt;b&gt; Not change my colour&lt;/b&gt; &lt;br&gt;               
  
      &lt;div id="my_div_3"&gt; 
          &lt;a href="#"&gt;Not change my colour &lt;/a&gt;&lt;br&gt;
          &lt;a href="#"&gt;Not change my colour &lt;/a&gt;&lt;br&gt;        
      &lt;/div&gt;
  
      &lt;a href="#"&gt;change the colour &lt;/a&gt; &lt;br&gt;
      &lt;b&gt; Not change my colour&lt;/b&gt;  &lt;br&gt;       
  &lt;/div&gt;
  </code></pre>
  
  <p>But the output is:</p>
  
  <p><a href="https://i.stack.imgur.com/qg7BB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qg7BB.png" alt="enter image description here"></a></p>
  
  <p>Please correct me where I'm doing wrong. thanks!</p>