title: Is it valid to nest <html> inside <html>?
body: <p>Is this valid HTML?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head/&gt;
      &lt;body&gt;
          &lt;p&gt;Hello, World&lt;/p&gt;
          &lt;html&gt;
              &lt;head/&gt;
              &lt;body&gt;
                  &lt;p&gt;Hello, World 2: Revenge of the Pointer&lt;/p&gt;
              &lt;/body&gt;
          &lt;/html&gt;
          &lt;html&gt;
              &lt;head/&gt;
              &lt;body&gt;
                  &lt;p&gt;Hello, World 3: GOTO null&lt;/p&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>According to the <a href="http://www.w3.org/TR/html5/semantics.html#the-html-element" rel="nofollow">HTML5 specs</a>, the <code>&lt;html&gt;</code> element can be used:</p>
  
  <blockquote>
    <ul>
    <li>As the root element of a document.</li>
    <li>Wherever a subdocument fragment is allowed in a compound document.</li>
    </ul>
  </blockquote>
  
  <p>It's the second part that I'm confused about. Does this mean that <code>&lt;html&gt;</code> is a "document" and any nested <code>&lt;html&gt;</code> is a "subdocument fragment"? How can I tell if this is "allowed"?</p>