Re: Alignment Inheritance in HTML 4.01 Tables
Christian Roth <[email protected]> Thu, 1 Dec 2011 00:43:03 +0100
| Newsgroups | gmane.comp.web.html.general |
|---|---|
| Message-ID | <[email protected]> |
fantasai wrote on Sun, 16 Jul 2000 21:46:39 -0400: > <BLOCKQUOTE = cite=3D"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: >=20 > 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> >=20 > '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? >=20 > Also, the value of the attribute 'style' is never inherited. > If it did, then this: >=20 > <TABLE style=3D"font-size: smaller"> > <TR> > <TD> > Cell A > </TD> > </TR> > </TABLE> >=20 > would have the same result as this: >=20 > <TABLE style=3D"font-size: smaller"> > <TR style=3D"font-size: smaller"> > <TD style=3D"font-size: smaller"> > Cell A > </TD> > </TR> > </TABLE> >=20 > 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'.=20 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.=20 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=