Re: proper count of <td> tags, colspan attribute, rowspan attribute

* at 11/11 20:20 +0100 FJ_Thuringia@web.de said:
> 
> Hello,
> 
> in the real world of creating HTMLs I often have errors, that result
> from missing <td> tags, surplus <td> tags, incorrect colspan
> attributes and incorrect rowspan attributes. Am I right, that W3Cs
> HTML validator can't detect such errors? Are there tools in this
> world, that are able to detect such errors?

The problem is that it's not, technically, an error. In fact the HTML
4.01 spec goes as far as to say that for rows with less than the
maximum number of columns you should pad the end of the row with empty
cells. [0]

Anything checking your HTML has no way to know whether you intended
that or not. I'd suggest that the easiest way is to use a stylesheet
something like this:

td { border-width: 1px;
     border-style: solid; }

which should show you what the table looks like (not that I've tested
it and it's obviously browser dependant).

cheers

Struan

[0] see the section on calculatiing the number of columns in a table

Received on Tuesday, 11 November 2003 16:44:17 UTC