title: how to hide img tag using pseudo elements
body: <p>I have below piece of code and want to hide img tag using css pseudo elements.</p>
  
  <pre><code>&lt;body&gt;
       &lt;div&gt;
           &lt;img src="hi.png"&gt;
           &lt;div class="container1"&gt;
                &lt;p&gt;somevalue &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div&gt;
           &lt;img src="hi.png"&gt;
           &lt;div class="container2"&gt;
                &lt;p&gt;somevalue &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;style&gt;
      .container :: before{
  display: none;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>unfortunately above code is not working and my image is not being hidden. Please help me out how to get this done by using CSS.</p>
  
  <p>In above code i want to hide only the image tag which is present before container2 class. I will have a cycle of classes (i just added only 2 for example) please help me out.</p>