W3C home > Mailing lists > Public > www-validator@w3.org > November 2010

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

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 8 Nov 2010 20:38:26 +0200
Message-ID: <22F96D177D3D42F58D2C89AD490E634B@JukanPC>
To: <peasthope@shaw.ca>, <www-validator@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:19 UTC