[whatwg] colspan="0"

Henri Sivonen hsivonen at iki.fi
Wed Nov 8 15:01:07 PST 2006

On Nov 6, 2006, at 09:36, Matthew Paul Thomas wrote:

> On Nov 4, 2006, at 1:53 AM, Henri Sivonen wrote:
>> None of Opera 9.02, Firefox 2.0, IE7 and Safari 2.0.4 implement  
>> colspan="0" as specified in HTML 4.01. Trident, Presto and WebKit  
>> at least agree on what to do with it: they treat it like colspan="1".
>> I suggest that only positive integers be conforming and that non- 
>> conforming values be treated as 1.
>> ...
> I know browser vendors have had a long time to implement this, but  
> still, I think giving up on it would be a shame. The number of rows  
> or columns in a table is often rather expensive to calculate ahead  
> of time. As long as this has to be done to calculate the rowspan=  
> or colspan= of header cells, this can substantially increase the  
> time an application takes to generate a table. For the browser to  
> interpret colspan="0" or rowspan="0" instead would both make life  
> easier for application authors, and make such pages faster overall.

That won't work for colspan='0' and explicit column groups, because  
you'd still have to calculate the column groups and output them  
before you output any rows.

What Gecko does with the last cell on a row having colspan="0"  
rowspan="1" might be marginally useful for your use case, but I don't  
think this particular case is worth breaking the interop that now  
exist between Trident, Presto and WebKit.

If the colspan="0" cell is not the last on a row in Gecko, the  
results are weird.

With colspan="0" and rowspan greater than 1, the rules for finding  
free slots for later cells fall apart. How would you spec the  
handling of the following table?
<tr><td colspan="0" rowspan='2'>1</td></tr>
The Gecko treatment is just weird.

So I stand by my suggestion that colspan="0" be non-conforming and be  
treated as colspan="1" by UAs.

rowspan='0' is interoperable as defined in HTML 4.01, so no reason to  
change that one. It doesn't cause weirdness, because the search for  
available cell slots works horizontally and rowspan='0' extends cells  

Henri Sivonen
hsivonen at iki.fi

More information about the whatwg mailing list