W3C home > Mailing lists > Public > www-validator@w3.org > November 2003

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

From: Struan Donald <w3-validator@exo.org.uk>
Date: Tue, 11 Nov 2003 21:42:42 +0000
To: www-validator@w3.org
Message-ID: <20031111214242.GA30900@struan.dsvr.co.uk>

* 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).



[0] see the section on calculatiing the number of columns in a table
Received on Tuesday, 11 November 2003 16:44:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:39 UTC