Re: correct use of tfoot

On 12/1/06, John Foliot <jfoliot@stanford.edu> wrote:
>
> Antony Tennant wrote:
> >
> > Here are my questions:-
> > 1. Is the initial example accurate i.e a repeat of the thead cells
> > (assuming the size of the table warrants it)
>
> This is/has been my general understanding, that the <tfoot> "echoes" the
> <thead> so that there is <th> reference points at both the top and bottom.
> However, I don't think the W3C specifically *mandates* as such, and I can
> now think (based on the thread you quoted) that there would be no reason why
> the content of the <tfoot> could not be *somewhat* different.
>
> For example, if you had a long, matrix style table which tracked, say, sales
> by department over 12 months, then I suspect it would be appropriate to have
> the following:
>
> <table>
>   <thead>
>     <tr>
>       <th>Month</th>
>       <th>Dairy</th>
>       <th>Produce</th>
>       <th>Butcher</th>
>       <th>Dry Goods</th>
>     </tr>
>   </thead>
>   <tfoot>
>     <tr>
>       <th></th>
>       <th>{total Sales figure}</th>
>       <th>{total Sales figure}</th>
>       <th>{total Sales figure}</th>
>       <th>{total Sales figure}</th>
>     </tr>
>   </tfoot>
>   <tbody>
>     <tr>
>       <th>January</th>
>       <td>$2,500.00</td>
>       <td>$3,500.00</td>
>       <td>$4,500.00</td>
>       <td>$5,500.00</td>
>     </tr>
>
> ...etc.

I don't think this would be a wise idea as the duplicating rows at the
end up table is a useful feature that would be lost if it simply got
used to mark up a summation column. I believe it would be far better
suited to simply apply an id or class to the last <tr>.
-- 

Orion Adrian

Received on Friday, 1 December 2006 18:38:43 UTC