Re: Question about Data Tables

The HTML specification defines an algorithm for determining table headings:

http://www.w3.org/TR/html401/struct/tables.html#h-11.4.3

chaals

Isofarro wrote:

>>I'm developing a data table interpreter. I almost done with it, but I'm
>>a little stumped on what to do about table headers that haven't been
>>given a scope or id/header association.
>>    
>>
>
>Possibly the next step (after col, colgroup, thead and tfoot) is to look at
>elements around it. I'd hazard a guess that if there's table data in the
>same row, either immediately before or immediately after the th, then the
>scope of the header could be row. If there's table data in the corresponding
>cell on the previous or next row, then the scope may be col.
>
>There are probably quite a few exceptions to these pointers.
>
>  
>
>>My first inclination was to have scope="col" be the default behavior,
>>but I've run into instances where scope="row" is assumed as well. Is
>>the user agent expected to guess in these situations?
>>    
>>
>
>Seems that way :(
>
>  
>
>>This is going to be part of a validator, so I'm not interested in error-
>>handling; I want to know what is expected from a standards perspective.
>>    
>>
>
>I don't believe there's anything further defined after scope header and id
>attributes. Although there's still the colgroup / col elements that could
>allow grouping. Correspondingly, the thead and tbody give inklings to col
>type scopes.
>
>
>Mike.
>
>
>  
>

Received on Tuesday, 22 April 2003 09:54:58 UTC