Help with HTML validation error: Table column has no cells beginning in it

Thomas Bonini picture Thomas Bonini · Feb 19, 2010 · Viewed 27k times · Source

Please help me with this validation error. I can't understand what it means or what's not standards complaint with my HTML.

I'll repost it here since hopefully I'll fix it and that link will no longer work:

Table column 2 established by element td has no cells beginning in it.

…="tooltip_table"><tr><td colspan="2">20 yd range</td></tr><tr><td colspan="2"
                                     ↑

Answer

Pekka picture Pekka · Feb 19, 2010

When you say colspan="2", the column is supposed to stretch across two columns. My guess would be that there is no second column defined anywhere else in the able, thus making colspan="2" impossible (and unnecessary).

I can't find anything in the spec explicitly saying it's illegal. Maybe the table calculating algorithm quoted in that spec is different from 4.01, but it's way too late in my time zone to try and get around that :)

However, I find the error message makes too perfect sense to be an outright bug.

Table column 2 established by element td has no cells beginning in it.

By using colspan="2", you imply the existence of a second column, which doesn't exist in that case. Common sense tells me it is correct to nag about.

Maybe somebody can shed some light on this... Or it is, indeed, a bug.