- From: Ben Boyle <benjamins.boyle@gmail.com>
- Date: Mon, 24 Mar 2008 18:19:00 +1000
- To: "Ian Hickson" <ian@hixie.ch>
- Cc: whatwg@whatwg.org, "HTML WG" <public-html@w3.org>
Thanks for the Easter update Ian, On Mon, Mar 24, 2008 at 5:29 AM, Ian Hickson <ian@hixie.ch> wrote: > On Thu, 16 Aug 2007, Ben Boyle wrote: > > > > Look at the balance sheet (3rd table). It's like we have nested sections > > within the table. There's "net assets" that's broken down into "current > > assets", "non-current assets" and "liabilities", each either their own > > heading and totals (footer). > > > > It would be interesting to investigate table markup that could support > > complex relationships within tables like this. It may be a bit esoteric, > > and can probably be handled through classes for those that need it. In > > either case it's very important we can clearly associate the headers > > with the right cells. I think it would be useful to be able to identity > > the "totals" (footers?) in each section too. > > For simple cases like: > > WATER FOOD > CATS > male 871 12 > female 900 10 > TOTALS FOR CATS 1771 22 > DOGS > male 871 12 > female 900 10 > TOTALS FOR DOGS 1771 22 > TOTALS 3542 44 > > ...you can now easily get this effect by putting everything in the left > hand column into <th>s, everything on the top row into <th>s, and > everything on the bottom row into its own <tfoot>. > > Does that work? Yes (for me anyway). I may use a separate tbody elements for cats and dogs. A way to nest a footer within the tbody would provide an additional semantic detail for the subtotal rows, but I don't know that it's required. > > I'm going to through a crazy idea into the mix and suggest that > > <section>, <header> and <footer> may be useful within data tables for > > this very purpose. > > I'm not clear on how that would work. (Especially considering backwards > compatibility and the CSS table model.) It was to do with nesting. We have tbody, thead and tfoot which essentially fulfil similar purposes to the sectioning elements. The difference being they don't easily nest. Given that one can nest entire tables if desired, and that it's more important to reduce information complexity anyway, I'm fine with what we have and keeping it simple (if I may refer to HTML tables as simple!) cheers Ben
Received on Monday, 24 March 2008 08:19:34 UTC