- From: Toby A Inkster <mail@tobyinkster.co.uk>
- Date: Sat, 21 Feb 2009 21:48:49 +0000
Michael Ball wrote: > <!DOCTYPE HTML5> 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 "<html>...</html>". In HTML 4, it's technically possible to use elements other than <html> as the root element. See this example: http://examples.tobyinkster.co.uk/div.html 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> <http://tobyinkster.co.uk>
Received on Saturday, 21 February 2009 13:48:49 UTC