W3C home > Mailing lists > Public > www-validator@w3.org > September 2005

Validator and/or correct markup for empty table row

From: Robert J. O'Hara <rjohara@post.harvard.edu>
Date: Tue, 27 Sep 2005 20:17:17 -0400
Message-ID: <4339E10D.3070007@post.harvard.edu>
To: www-validator@w3.org

I have a puzzle in the design and validation of a moderately complex 
table that is available at:

  http://rjohara.net/coins/chronology/

The table is a timeline, as you will see, and it makes liberal use of 
rowspans and some colspans to place chronological intervals into the table.

Each row represents 25 years, and the <th> elements in the left column 
are each given a rowspan=2 so they will appear at 50 year intervals. 
(This is done in part to avoid giving an impression of high accuracy in 
the dating of events, which are far more approximate than the sharp 
lines of the table indicate.)

The problem occurs in the rows corresponding to 475BC and 425BC. These 
rows are empty and are "covered" by the rowspans of the left <th> 
elements and the tall and wide main <td> cell, which spans 4 rows and 4 
cols.

As I understand the specification, every <tr> must contain a cell of 
some kind. The <tr>s of these two rows do not, and so the validator 
kicks up an error. (There is a validation link at the bottom of the 
page.) But in the design of the table, these two rows must be empty, 
because they are subsumed under the rowspans (of two different heights) 
above them. You might say that the rows should simply be deleted; that 
is a possibility, but I have heights set on rows and cells to maintain 
an approximately linear scale, and deleting the rows completely seems 
like just a hack to get it to validate, one that denies the (to me) 
logically correct structure of the table (the row is there, and is just 
covered by the rowspans above; if this is legitimate within one column 
it should be legitimate across all columns).

So, should this be marked up in a different way, or should this be 
considered perhaps a flaw in the specifications, which may not have 
conceived this particular design problem? Or should the validator and 
the specifications be altered to accept empty <tr>s iff they are 
subsumed under rowspans?

Opinions welcome.

Bob O'Hara (rjohara.net)
Received on Wednesday, 28 September 2005 01:03:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:20 GMT