W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2004

Re: Puzzled by lack of HTML, HEAD and BODY tags in output

From: Christophe Strobbe <christophe.strobbe@esat.kuleuven.ac.be>
Date: Wed, 28 Jul 2004 16:18:28 +0200
Message-Id: <>
To: HTML-tidy list <html-tidy@w3.org>

Hi John,

At 15:37 28/07/2004, John Bray wrote:

>I guess I thought that HEAD and BODY were still essential. Certainly
>http://www.w3.org/TR/html401/struct/global.html suggests they are still
>needed, though I've not burrowed into the details of the specification.

Yes, the elements are essential, but the start and end tags are strictly
optional (this is also the case with the elements HTML and TBODY).
That is the meaning of the two 'O's in e.g.
(at <http://www.w3.org/TR/html401/struct/global.html#h-7.4.1>)
The first O means that the start tag can be omitted, the second that the
end tag can be omitted. For other elements, both start tag and end tag
are required, e.g.

When start and end tags are omitted, an SGML parser infers the presence
of the element with the help of the DTD. But browsers don't contain
SGML parsers, so some get confused by the absence of optional tags.
The above explanation only applies to SGML-based languages (like HTML 4),
not to XML-based languages. Omitting start and end tags is not legal
in XHTML, so Tidy should leave those in.



Christophe Strobbe
K.U.Leuven - Departement of Electrical Engineering - Research Group 
on  Document Architectures
Kasteelpark Arenberg 10 - 3001 Leuven-Heverlee - BELGIUM
tel: +32 16 32 85 51
Received on Wednesday, 28 July 2004 10:19:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:55 UTC