Re: Alignment Inheritance in HTML 4.01 Tables

fantasai wrote on Sun, 16 Jul 2000 21:46:39 -0400:

>  <BLOCKQUOTE cite="http://www.w3.org/TR/html4/struct/tables.html#h-11.3.2.1
> ">
>   The order of precedence (from highest to lowest) for the attribute
>   valign (as well as the other inherited attributes lang, dir, and style)
>   is the following:
> 
>      1.An attribute set on an element within a cell's data (e.g., P).
>      2.An attribute set on a cell (TH and TD).
>      3.An attribute set on a row or row grouping element (TR, THEAD,
>        TFOOT, and TBODY). When a cell is part of a multi-row span, the
>        attribute value is inherited from the cell definition at the
>        beginning of the span.
>      4.An attribute set on a column grouping element (COL and COLGROUP).
>        When a cell is part of a multi-column span, the attribute value is
>        inherited from the cell definition at the beginning of the span.
>      5.An attribute set on the table (TABLE).
>      6.The default attribute value.
>  </BLOCKQUOTE>
> 
> 'valign' does not apply to the table, (although lang, dir, and style do).
> Shouldn't it be listed as an exception to rule no. 5?
> 
> Also, the value of the attribute 'style' is never inherited.
> If it did, then this:
> 
>     <TABLE style="font-size: smaller">
>       <TR>
>         <TD>
>           Cell A
>         </TD>
>       </TR>
>     </TABLE>
> 
> would have the same result as this:
> 
>     <TABLE style="font-size: smaller">
>       <TR style="font-size: smaller">
>         <TD style="font-size: smaller">
>           Cell A
>         </TD>
>       </TR>
>     </TABLE>
> 
> which is not the case.

I just stumbled upon the exact same question(s) while trying to implement HTML tables, specifically the issue with what the spec says about the inheritance of 'style'. 

There has never been an answer to this question (at least, I couldn't find it in the archives, [1]), and there is also no Errata entry on this for HTML 4.01. 

The question was raised more than 10 years ago. Am I to assume that indeed 'style' is meant to be inherited as the spec says (see fantasai's example above) and all current (as of Nov. 2011) browsers I tested this with get it wrong?

[1] http://lists.w3.org/Archives/Public/www-html/2000Jul/0066.html

Regards
Christian

Received on Wednesday, 30 November 2011 23:43:28 UTC