[whatwg] HTML syntax: </thead>, </tbody> and </tfoot> omission

On Thu, 30 Nov 2006, Simon Pieters wrote:
> 
> The syntax section says:
> 
>   A thead element's end tag may be omitted if the thead
>   element is immediately followed by a tbody or tr element.
> 
> Tables created by the HTML parser in conforming HTML5 will always have a 
> tbody element.

Oops, that should have been tbody and tfoot. Good catch.



> Further, the <tbody> start tag is also optional if it 
> starts with <tr>. [...]

Good catch as well.


> I think this is better fixed by talking about start tags instead of 
> elements (except for parent elements).

It gets very confusing if you talk about tags being followed by elements. 
The "tags" are just unstructured characters in a stream. The "elements" 
are in a DOM. So the presence or absence of tags IMHO has to be given in 
terms of the elements in the DOM.

But at any rate, fixed, by saying that <tbody> can't be omitted if the 
preceeding element's end tag was omitted.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 30 November 2006 14:44:43 UTC