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

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

From: Perry, Russell <rperry@monitorliability.com>
Date: Tue, 5 Feb 2002 13:05:58 -0500 (EST)
Message-ID: <E2A5DA5B3EA4D5119C39009027139DED1D71F3@MLMBACKOFFICE>
To: "'www-validator@w3.org'" <www-validator@w3.org>
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.  We were
actually surprised to find that html, head and body were all optional, and
we're not sure why, but that's okay.

The other thing is that for title the definition
(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
are a little confusing...

Russ Perry Jr
Software Engineer
Monitor Liability Managers, Inc. 
847.806.6590 #553 Fax: 847.806.6282
Email: rperry@monitorliability.com
Website: http://www.monitorliability.com
Received on Wednesday, 6 February 2002 17:14:50 GMT

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