[whatwg] HTML5 DOCTYPE suggestion

Toby A Inkster mail at tobyinkster.co.uk
Sat Feb 21 13:48:49 PST 2009

Michael Ball wrote:


Although HTML 5 consciously breaks away from HTML's SGML legacy, in  
SGML terms, the first component of a document type declaration (i.e.  
the first thing after "!DOCTYPE") defines the document's root element  
name. So if you used "<!DOCTYPE HTML5>" then SGML tools would expect  
the document to be wrapped in "<html5>...</html5>" tags instead of  

In HTML 4, it's technically possible to use elements other than  
<html> as the root element. See this example:


Of course, browsers don't do strict SGML parsing, so the above  
document is actually parsed as if it had <html> and <body> elements  
wrapping it.

Toby A Inkster
<mailto:mail at tobyinkster.co.uk>

More information about the whatwg mailing list