HTML full screen side without scrollbars
<p>I tried to create a full screen website without scrollbars and have problems defining the margins for that. Given is a minimum example:</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>html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: yellow;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    max-height: 100%;
    background: green;
}

h1 {
    background: gray;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;body&gt;
        &lt;h1&gt;Heading 1&lt;/h1&gt;
    &lt;/body&gt;</code></pre>
</div>
</div>
</p>

<p>Why do I get the yellow background of the <code>html</code> element in the top of the side? Even more surprising to me is that the yellow part disappears, if I add text before the <code>h1</code> element.</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>html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: yellow;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    max-height: 100%;
    background: green;
}

h1 {
    background: gray;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;body&gt;
        Add some text and the yellow part disappears.
        &lt;h1&gt;Heading 1&lt;/h1&gt;
    &lt;/body&gt;</code></pre>
</div>
</div>
</p>

<p>Is there any idea to avoid the yellow part in the top without adding text before the heading element?</p>