Re: Complex Table Examples

2007/6/6, Anne van Kesteren:
> On Tue, 05 Jun 2007 23:06:04 +0200, Thomas Broyer <t.broyer@gmail.com>
> wrote:
> >  - the algorithm in HTML5 for associating header cells and data cells
> > is far less powerful than the "basic" one from HTML4 (it starts from
> > headers and searches data cells to associate with, while the HTML4
> > algorithm takes the other way: from data cells to header cells, which
> > is generally what people need, I guess)
>
> I'm not sure how that makes it less "powerful". It's just a different way
> of defining the same thing.

The point is that it does not define the same thing.

The BASIC algorithm from HTML4 finds TH header cells for a given data
cell even if that TH cell is not in the first column or row (when it
has no scope=)

This table "doesn't work" with HTML5 algorithm, but does with the
BASIC algorithm from HTML4:
<table>
<colgroup span=3>
<colgroup span=3>
<thead>
   <tr>
      <th></th>
      <th>Column A</th>
      <th>Column B</th>
      <th></th>
      <th abbr="Column A">Column A (suite)</th>
      <th abbr="Column B">Column B (suite)</th>
   </tr>
</thead>
<tbody>
   <tr>
      <th>Row 1</th><td>A1</td><td>B1</td>
      <th>Row 11</th><td>A11</td><td>B11</td>
   </tr>
   <tr>
      <th>Row 2</th><td>A2</td><td>B2</td>
      <th>Row 12</th><td>A12</td><td>B12</td>
   </tr>
   ...
   <tr>
      <th>Row 10</th><td>A10</td><td>B10</td>
      <th>Row 20</th><td>A20</td><td>B20</td>
   </tr>
</tbody>
</table>

Yeah, I know, this table should really be marked-up differently, as
the fact that rows 11 to 20 are shown side by side with rows 1 to 10
is probably just a matter of presentation (there might be use cases
where it deserves a real role, such as making it easier to compare
figures by putting them near from one another)

-- 
Thomas Broyer

Received on Wednesday, 6 June 2007 09:16:55 UTC