RE: doctype placement

Sorry, I forwarded my response to the wrong address; see my comments

-----Original Message-----
From: Brian Gilkison []
Sent: Sunday, July 25, 1999 6:33 PM
Subject: RE: doctype placement

> 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:

The author has cited the correct location in the spec, but he left out the
details (what he is citing can be found at

>     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.

Line 1 is, in fact, the <!DOCTYPE ...> definition itself

>     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.

The fact that the spec indicates that sections 2 and 3 are delimited by the
<HTML> element also implies that the <!DOCTYPE> comes first.  Farther down
the page (, the
spec goes on to state, "After document type declaration, the remainder of an
HTML document is contained by the HTML element."  Once again, indication
that the DOCTYPE comes first.

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

Still not a bug, no fixing needed :).  No offense toward the creators of
MHonArc, but this is yet another instance of an HTML editor imposing what it
thinks is good style, but is unfortunately, accomplished incorrectly.

Brian Gilkison

Received on Monday, 26 July 1999 17:59:38 UTC