Re: Explanation on usage of 'td' vs 'th' within a thead

On Tue, 21 Jul 2009, Seth Call wrote:
> 
> I know I'd personally benefit from an explanation of the usage of 'td' 
> versus 'th' in a thead.
> 
> Why would someone ever put a 'td' in a thead?  Related question... why 
> would put in a mix of td's and th's within a thead?
> 
> Maybe It's just a lack of creativity on my part, or a lack of experience 
> with tables, but after reading the spec, I still don't understand why 
> I'd use td vs a th in a thead; morever, I don't have a good reason why 
> I'd mix the two in a single thead.

I agree that a <thead> would usually contain <th>s.


On Wed, 22 Jul 2009, Giovanni Campagna wrote:
> 
> Uhm... Look at
> |=========================================================|
> | Month |   Incomes           |          Outcomes         |
> |       | Salary |   Other    | Food  | Transp. | Entert. |
> |=========================================================|
> | Jan   |€  1500 | €       85 | € 720 | €   310 | €   150 |
> | Feb   |€  1500 | €       85 | € 685 | €   380 | €   210 |
> /etc/
> 
> headings in the second row can be marked as <td> because they're
> actually data (the reason for spending / earning money)

No, those headers should all be <th>s per the spec.


On Wed, 22 Jul 2009, Seth Call wrote:
> 
> I think you are right; td/th are options simply because of the content 
> model of tr.  I'd hope, though, that if there is no reason to use td 
> within a thead, that the spec could indicate that by adding a 
> restrictive condition to the tr content model when in a thead.

After examining a whole bunch of tables, I've come to the same 
conclusion, and have adjusted the spec accordingly.

I expect we'll change this back, and allow <td> in <tr>, because I expect 
someone will find a table where it makes sense. If anyone can find a table 
where it makes sense, I'll change it back.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 1 August 2009 09:14:56 UTC