Is this valid HTML?
<!DOCTYPE html>
<html>
<head/>
<body>
<p>Hello, World</p>
<html>
<head/>
<body>
<p>Hello, World 2: Revenge of the Pointer</p>
</body>
</html>
<html>
<head/>
<body>
<p>Hello, World 3: GOTO null</p>
</body>
</html>
</body>
</html>
According to the HTML5 specs, the <html>
element can be used:
- As the root element of a document.
- Wherever a subdocument fragment is allowed in a compound document.
It's the second part that I'm confused about. Does this mean that <html>
is a "document" and any nested <html>
is a "subdocument fragment"? How can I tell if this is "allowed"?