- From: Dão Gottwald <dao@design-noir.de>
- Date: Tue, 17 Apr 2007 19:32:17 +0200
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: David Dailey <david.dailey@sru.edu>, public-html@w3.org, Ian Hickson <ian@hixie.ch>
So the WHATWG draft is indeed incompatible with what user agents do today, and HTML4 content isn't necessarily compatible with the WHATWG draft, right? --Dao Boris Zbarsky schrieb: > > 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: > > <!ELEMENT TABLE - - > (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)> > > 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 17:32:28 UTC