Re: Doctypes and the dialects of HTML 5

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.

Lachlan Hunt

Received on Saturday, 24 March 2007 18:19:51 UTC