|
Posted by Harlan Messinger on 01/06/08 17:18
TonyV wrote:
> I've read that in XHTML 1.1, if you have a thead and tbody, you *must*
> have a tfoot. Also, according to the specification, it looks like all
> three *must* have at least one tr child element, with at least one th
> or td child element in it. Here's the spec I'm reading:
> http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_tablemodule
That's not how I'm reading it. The content model is:
caption?, ( col* | colgroup* ), (( thead?, tfoot?, tbody+ ) | ( tr+ ))
A question mark means "0 or 1", a plus sign means "1 or more". The only
"have to's" I see here is that if you have either a thead or a tfoot,
then you have to have at least one tbody, and if you have a tbody, then
every tr has to be in a thead or a tfoot or a tbody. Under no
circumstances is thead or tfoot required.
> My question is pretty simple. What if you want a table with just a
> thead and tbody section, but not with a tfoot section? I don't
> understand why I *must* have a cell defined in up to two sections (in
> this case, the tfoot section), cells which will be completely blank,
> which I suppose means I'll have to use some CSS to make sure it's not
> displayed, instead of just not having the section.
>
> Is there a standard practice for what to do if you have a thead and
> tbody but not a tfoot?
[Back to original message]
|