title: The margin of h1 tag in HTML pushed its container down
body: <p>Just look at the picture below. I don't know why the header (blue block) has gone down a little bit. I mean, the blue block should exactly touch the end of the content area of the browser. Some people told me that is because of the margin of h1. But I think this margin can only cause h1 to go down a little bit inside the blue block instead of making the entire blue block go down. Who can help me? Thanks a lot!</p>
  
  <p><a href="https://i.stack.imgur.com/GfdY4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GfdY4.jpg" alt="enter image description here"></a></p>
  
  <p>Sorry, the code is now added below.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;just for test&lt;/title&gt;
  &lt;style&gt;
      body,html {
          margin: 0;
      }
  
      header {
          background-color: blue;
          height: 200px;
          width: 1200px;
          margin: 0 auto;
          text-align: center;
          padding: 0;
      }
  
      h1 {
          color: white;
  
      } 
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;header&gt;
          &lt;h1&gt;Why does it have to be like this?&lt;/h1&gt;
      &lt;/header&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>