W3C home > Mailing lists > Public > public-html@w3.org > January to March 2007

Re: Doctypes and the dialects of HTML 5

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sun, 25 Mar 2007 04:19:15 +1000
Message-ID: <46056BA3.3060306@lachy.id.au>
To: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>
CC: public-html@w3.org

Daniel Schattenkirchner wrote:
> from an authors point of view I was wondering how HTML5 will handle 
> doctypes (I hope we all know why they are important).

DOCTYPEs only serve 2 practical purposes in the real world for HTML: DTD 
based validation and DOCTYPE sniffing.  HTML5 does away with DTD based 
validation because DTDs cannot express the conformance requirements of 
HTML adequately enough (there are much better alternatives!).

That leaves DOCTYPE sniffing (a necessary evil for compatibility with 
the real world), and for that: <!DOCTYPE html> serves that purpose well! 
It's easy to remember and type, reducing an author's dependence upon 
copying and pasting the uselessly long DOCTYPE for every new document.

> Even if Web Applications 1.0 becomes HTML5 I don't think it can keep 
> "<!DOCTYPE html>" because it probably needs versioning in it. The public 
> "-//W3C//DTD HTML 5.0//EN" comes to my mind.

There is no versioning in HTML, the numbers in the PUBLIC identifier 
only serve to differentiate the different versions of DTDs.  In 
practice, the version numbers don't really matter.

> However, I was actually wondering wether there'll be one doctype for the 
> SGML and XML dialects of HTML5, or one for each dialect, which could 
> result from different naming (XHTML5?).

It is already called XHTML5, but there is no DOCTYPE required.  Authors 
may use <!DOCTYPE html> in XHTML5 if they wish (it is well-formed), but 
it is pointless.

Further information can be found in these documents.

http://hsivonen.iki.fi/validator-about/#faq
http://blog.whatwg.org/html-vs-xhtml
http://blog.whatwg.org/faq/#doctype
http://blog.whatwg.org/faq/#validation
http://wiki.whatwg.org/wiki/HTML_vs._XHTML

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Saturday, 24 March 2007 18:19:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 24 March 2007 18:19:55 GMT