W3C home > Mailing lists > Public > www-validator@w3.org > September 2004

Re: [VE][344] Error Message Feedback

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Fri, 24 Sep 2004 23:57:36 +1000
Message-ID: <415427D0.4070902@iinet.net.au>
To: Harshad <harshad@gsimail.com>
CC: www-validator@w3.org

Harshad wrote:
> no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

It means that your document has not started with a DOCTYPE [1], which 
all HTML documents should have.  If you don't include a doctype, the 
document is invalid, and modern UAs just treat it as tag soup, meaning 
they try their best to handle whatever they get.  Most people these days 
should be using either HTML 4.01 Strict or Transitional doctypes.  I 
don't recomend you use XHTML just yet, as it is not supported by all UAs.

Pick the DOCTYPE based on the which elements you've used.  If you've 
used any deprecated elements [2], than you need to use Transitional.  If 
not, then I recommend that you use Strict.  If you've used any elements 
not listed in [2], then they are likely to be proprietary extensions, 
which should not be used anyway.

By using a DOCTYPE, modern UAs will parse and render the document in a 
standards compliant mode.  If you omit the doctype, the rendering will 
be in quirks mode, which essentially means that they attempt to be 
bugwards compatible with the ancient IE and Netscape 4.x parsing and 
rendering.  This process is called DOCTYPE sniffing.  I recommend you 
follow the standards and use a correct doctype.

[1] http://www.w3.org/QA/2002/04/valid-dtd-list.html
[2] http://www.w3.org/TR/html401/index/elements.html

-- 
Lachlan Hunt
http://lachy.id.au/
http://getfirefox.com/    Rediscover the Web
http://spreadfirefox.com/   Igniting the Web
Received on Friday, 24 September 2004 13:58:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:15 GMT