W3C home > Mailing lists > Public > www-validator@w3.org > February 2002

Re: html, head and body tags optional -- but singly, or together?

From: Nick Kew <nick@webthing.com>
Date: Wed, 6 Feb 2002 23:34:49 +0000 (GMT)
To: "Perry, Russell" <rperry@monitorliability.com>
cc: "'www-validator@w3.org'" <www-validator@w3.org>, <gerald@w3.org>
Message-ID: <20020206232947.E1635-100000@fenris.webthing.com>

On Tue, 5 Feb 2002, Perry, Russell wrote:

> It doesn't appear clear from the standard (looking at 4.01), but when you
> have start and end tag both optional, should they be optional as a pair, or
> each tag alone?  I ask because we discovered one of our pages had a <head>
> tag, but no </head> tag, and it validated okay, which surprised us.

Yes, no problem.  If you don't like it, you can run your HTML through
a normaliser (e.g. sgmlnorm), use a DTD tweaked to make these tags
mandatory, or use XHTML which always makes them mandatory.

> (http://www.w3.org/TR/html4/struct/global.html#edef-TITLE) says "Every HTML
> document must have a TITLE element in the HEAD section.", but if the head
> tag is entirely optional anyway, what do we do about title?  These things

The HEAD is not omitted when you parse the document.  It is implied.

To see this, take a valid page that omits one or more of these tags,
and validate it using the Visual Validator at
It will show you normalised source, including the omitted tags.

Nick Kew

Site Valet - the mark of Quality on the Web.
Received on Wednesday, 6 February 2002 18:34:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:32 UTC