Discuss the articles posted on Dev.Opera.
By blackphoebe
Tuesday, 8. July 2008, 07:16:04
19: HTML tables
The HTML <table> element and its related friends and family allow you to represent tabular data in HTML. In this article, Jen Hanen gives you all you need to know about structuring tables in HTML.
( Read the article )
By remysharp
Tuesday, 8. July 2008, 22:39:07

In the nicest possible way - why is it semantically cleaner to put the tfoot directly after the thead - and not after the tbody (or rather I've assumed so since you're article suggests to order it like this)?
I understand in your example the tfoot gives more information to the user before diving in to the data points, but I've also used the tfoot to display total figures - which I guess you can argue could sit at the top.
Is this just a matter of preference or is there specific justification to put it before the tbody?
...now that I write this out, I think I can see the advantage to the user to always have the footer summarised data before the actual data points...but humour me anyway :-)
Cheers.
By chrismills
Wednesday, 9. July 2008, 08:30:47

Originally posted by remysharp:
...now that I write this out, I think I can see the advantage to the user to always have the footer summarised data before the actual data points...but humour me anyway :-)
Yup - this is the basic idea, although I don't think it really matters a huge amount either way at the end of the day, in terms of how a sighted visitor or screenreader user would access the data.
By dorward
Wednesday, 9. July 2008, 09:31:18

Originally posted by remysharp:
In the nicest possible way - why is it semantically cleaner to put the tfoot directly after the thead - and not after the tbody (or rather I've assumed so since you're article suggests to order it like this)?
It isn't so much "cleaner" as "required by the standard".
Originally posted by html 4:
<!ELEMENT TABLE - -
(CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
i.e. A table element contains an optional caption followed by any number of col or colgroup elemenets, followed by an optional thead, then an optional tfoot then at least one tbody.
Browsers render footers at the end of the table, even though they appear before bodies.
This would allow, for example (although I don't know any user agent that does this) the table to be rendered with the header and footer (which give the important information) and then the middle can be populated with vast amounts of data that might take a while to download.
By dstorey
Sunday, 13. July 2008, 22:45:17

David is correct: If you put the tfoot after tbody it would be invalid and thus throw a validation error (or it should do at least).