Top margin pulls top element : <p>Container is pulled down when inner element puts top margin so white section appear at the top of page. How can i prevent that white section ? </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
  background: red;
  height: 500px;
}

.inner {
  margin-top: 100px;
  height: 50px;
  background: yellow;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>Why there is white section in here ??
&lt;div class="container"&gt;
  &lt;div class="inner"&gt;&lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>
