title: To collapse div and p by CSS
body: <p><strong>How can you collapse div and p -elements if they are empty by CSS such that the tags are not shown for the user in the source code?</strong></p>
  
  <p>These elements are in my source code although they are empty.
  This causes bugs with the rest of the site.</p>
  
  <p>I run this unsuccessfully</p>
  
  <pre><code>div.unsuccessful,
  div.unsuccessful p {
      visibility: collapse;                                                                                                                                                                                      
  }
  </code></pre>
  
  <p>This suggests me that you apparently cannot do such a thing by CSS.
  Perhaps, other tool such as PHP is needed.</p>