W3C home > Mailing lists > Public > www-validator@w3.org > July 1999

doctype placement

From: Nat Irons <irons@apple.com>
Date: Thu, 22 Jul 1999 16:34:01 -0700
Message-Id: <199907222334.QAA07276@scv1.apple.com>
To: www-validator@w3.org
I use MHonArc to maintain a number of mailing list archives.  mhonarc
likes to add a handful of HTML comments to the beginning of its pages,
in advance of the doctype declaration.  The validator hates this; it
can't find a doctype at all if it isn't the first thing in the file.

<http://validator.w3.org/check?uri=http%3A%2F%2Fbumppo.net%2Flists%2Fmacperl%2F1999%2F07%2Fmsg00316.html>

I can't find anything in the HTML 4.0 spec to indicate that the
validator is doing the right thing.  In fact, when the subject came up
on the mhonarc list, its author cited the spec in his defense:

-------------
    7.1 Introduction to the structure of an HTML document

    An HTML 4.0 document is composed of three parts:
    1. a line containing HTML version information,
    2. a declarative header section (delimited by the HEAD element),
    3. a body, which contains the document's actual content. The body
        may be implemented by the BODY element or the FRAMESET element.

    White space (spaces, newlines, tabs, and comments) may appear
    before or after each section. Sections 2 and 3 should be
    delimited by the HTML element.
-------------

>From where I stand, the validator is exhibiting a bug, and I'm not sure
what's involved in fixing it.

  -nat

-- 
Nat Irons
Apple Computer, WWDR &c                            irons@apple.com
PGP fingerprint: 873D 7978 23FC 37FE 10D5 349A F57F 0FAA F4D4 B19A
"The land we belong to, belongs to the bank."  -  Garrison Keillor
Received on Thursday, 22 July 1999 19:34:31 GMT

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