title: CSS HTML Selector vs Class selector
body: <p>Hello,
  I have seen a strange behavior while using CSS HTML selector and class selector.
  in HTML file I have this code:</p>
  
  <pre><code>&lt;div class="content"&gt;
      &lt;h1&gt;Registration Form&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And in Css file I have:</p>
  
  <pre><code>.content
  {
      margin:auto;
      width:600px;
      border:solid 1px black;
      background-color:White;
      padding:10px;
  }
  
  h1
  {
      color:Gray;
      font-size:18px;
      border-bottom:solid 1px orange;
  }
  </code></pre>
  
  <p>Above code works perfectly.
  When I changed h1 HTML selector to Class selector by writing <code>.h</code> and <code>h1 class="h"</code> STILL it worked perfect.</p>
  
  <p>BUT 
  when I changed <code>.content</code> class selector to <code>div</code> (ie I converted class selector of <code>div</code> tag to DIV HTML selector ITSELF) then the output changed.
  It did not show me the text Registration form at all and showed horizontal lines above and below the area where Registration form text would be present.
  why is this strange behavior?</p>
  
  <p>Does it proves that class selector and HTML selector behave differently even if applied with SAME style rule effect?</p>