Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

brianiac (4158)

  (email not shown publicly)

Journal of brianiac (4158)

Tuesday March 14, 2006
02:37 PM

Tables require a TBODY

[ #28993 ]

Special note to the VisualStudio Team, the IE team, and all web coders: Check the spec, the table tag *does not* contain tr tags, and hasn't since 1999! Tables must contain tbody tags (and optionally thead and tfoot tags), and that's where the tr tags go.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • While I agree that the DTD is somewhat ambigous about it, a little further down the page doesn't agree with your findings... []
    • <!ELEMENT TABLE - -
                (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>

      That doesn't look ambiguous at all. If it's wrong (as suggested by the example, and the XHTML 1.0 and 1.1 DTDs), why has it never been fixed? I mean, that is a major technical error.
    • Start tag optional. *Sheesh*
  • Checking the same page, you can see the following for TBODY:
    <!ELEMENT TBODY    O O (TR)+           -- table body -->

    Start tag: optional, End tag: optional
    That would appear to mean, if I don't read it wrongly, that you can drop explicit mention of TBODY, so that embedded TR tags are in an implied TBODY, if you don't mention one.
    • I thought that XHTML 1.0's reliance on the HTML 4.0 spec was a problem here, but C.11. #2 seems to address this specifically:

      User agents that access XHTML documents served as Internet media types text/xml, application/xml, or application/xhtml+xml can also use the XML DOM. Elements and attributes will be returned in lower-case. Also, some XHTML elements may or may not appear in the object tree because they are optional in the content model (e.g. the tbody element [emphasis added] within table). This occur

  • It's a bug in the spec. (And the bug is not present in xhtml's dtd.)