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

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

From: liorean <liorean@gmail.com>
Date: Tue, 17 Apr 2007 18:50:28 +0200
Message-ID: <cee13aa30704170950u3a261feey3cc12e845ce0cc74@mail.gmail.com>
To: "HTML WG" <public-html@w3.org>

On 17/04/07, James Graham <jg307@cam.ac.uk> wrote:
> I believe HTML4 also requires that the tbody be present in the DOM but I'm not
> sure where it says that in the spec.

The HTML4 spec says it like this:

~~~~
<!ELEMENT TABLE - -
     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
/.../
Start tag: required, End tag: required
~~~~
and
~~~~
<!ELEMENT TBODY    O O (TR)+           -- table body -->

Start tag: optional, End tag: optional
~~~~

In other words, TR is not an allowed child of TABLE in HTML4, but it's
allowed as child of TBODY and TBODY has optional start and end tags.
So, there is always an implicit TBODY in HTML4. This is not true of
XHTML1 because XML serialisation doesn't allow optional tags.
-- 
David "liorean" Andersson
Received on Tuesday, 17 April 2007 16:50:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:42 UTC