w3c / wai-tutorials

308 stars 258 forks source link

col only in colgroup? Test and change if needed. #459

Closed yatil closed 7 years ago

yatil commented 7 years ago

From email:

In the "Tables with irregular headers" tutorial https://www.w3.org/WAI/tutorials/tables/irregular/, the examples given include the use of tags that are not children of . My IDE, IntelliJ IDEA, flags this as bad syntax. Looking at the HTML5 spec https://www.w3.org/TR/html5/tabular-data.html#htmltablecolelement, this does appear to be improper, since under "Contexts in which this element can be used" it says, "As a child of a |colgroup https://www.w3.org/TR/html5/tabular-data.html#the-colgroup-element| element that doesn't have a |span https://www.w3.org/TR/html5/tabular-data.html#attr-col-span| attribute." However, when I run it through the Nu Html Checker https://validator.w3.org/nu, it says there are "No errors or warnings to show." What is the correct interpretation of the standard? It seems like the standard is pretty clear in saying this is an incorrect use.
What am I missing here? Thanks.

I think it was allowed to use it without colgroup in HTML4 – from how I read the spec, I think there might even be no use to col at all (as it looks like colgroup can do everything it does), but I have to double check and test it with different AT.

yatil commented 7 years ago

I think it is an error in the HTML5.1 spec, in the HTML Living Standard™ of WHATWG the start tag can be omitted…

yatil commented 7 years ago

The bug in HTML5 has been fixed. Hooray!