Re: DOCTYPE; was Re (2): W3C validator error - End tag for element "HEAD" which is not open

peasthope@shaw.ca wrote:

> Can anyone explain why the DOCTYPE remains html while the DTD
> has advanced to XHTML?

An interesting question. I'm afraid the answer is less interesting.

The identifier following the keyword DOCTYPE specifies the name (generic 
identifier) of the root element of document. Thus, if it were xhtml, then 
documents would need to have (or imply) the start and end tags <xhtml> and 
</xhtml>. Maybe not a big issue, since browsers don't care much about such 
tags. But there might be a nonignorable number of pages that rely, in 
scripting or otherwise, on the root element's name being "html".

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

Received on Monday, 8 November 2010 18:39:09 UTC