W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Formal definition of HTML5 (was Re: Version information)

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 17 Apr 2007 11:49:30 -0500
Message-ID: <4624FA9A.6050801@mit.edu>
To: David Dailey <david.dailey@sru.edu>
CC: public-html@w3.org

David Dailey wrote:
> The W3C spec says
> "The <http://www.w3.org/TR/html401/struct/tables.html#edef-TBODY>TBODY 
> start tag is always required except when the table contains only one 
> table body and no table head or foot sections.

Right.  When the start tag is not required, it is implied.

In particular, the DTD for HTML 4 says:


which means <table> is allowed to contain an optional caption, some col/colgroup 
tags, an optional thead, an optional tfoot, and tbody tags.  It is NOT allowed 
to directly contain <tr>, for example.

At the same time, the DTD says

   <!ELEMENT TBODY    O O (TR)+           -- table body -->

Which means that the <tbody> element has optional start and end tags and is 
allowed to contain <tr> elements.  The prose then further restricts when the 
start tag is optional.

If an optional start tag is missing, the parser is required to synthesize it, as 
I understand SGML.

This is actually one area of serious incompatibility between HTML4 and XHTML1 
(in the latter, the tbody is well and truly optional, which means the same 
well-nested markup leads to a different DOM).

Received on Tuesday, 17 April 2007 16:49:38 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:19 UTC