[html5] Help Digest, Vol 56, Issue 4
Ian Hickson
ian at hixie.ch
Mon Jun 11 16:23:56 PDT 2012
On Mon, 16 Apr 2012, Laurence Gillian wrote:
>
> This markup works...
>
> <table>
> <thead>
> <tr>
> <th>name</th><th>allowed cups</th><th>cups drunk</th>
> </tr>
> </thead>
> <tbody>
> <!-- Top Containing Node(s) -->
> <tr>
> <th>Security</th><td>12</td><td>10</td>
> </tr>
> <!-- These are children of security -->
> <tr>
> <th>Chief</th><td>8</td><td>2</td>
> </tr>
> <tr>
> <th>Workers</th><td>4</td><td>8</td>
> </tr>
> <!-- And John could also have children too -->
> <tr>
> <th>John</th><td>2</td><td>4</td>
> </tr>
> <tr>
> <th>Terry</th><td>2</td><td>4</td>
> </tr>
>
> </tbody>
> </table>
>
> But the structure doesn't represent the relationships in the data.
I recommend looking at the example in this section:
http://www.whatwg.org/specs/web-apps/current-work/#the-th-element
...and the third example in this section:
http://www.whatwg.org/specs/web-apps/current-work/#examples-0
The latter in particular shows what the markup in your case might look
like. The indentation is done from CSS, using a rule like this:
.apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
HTH, and sorry for the delay,
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the Help
mailing list