|This is what I mean by a stub cell:
|
| GOOD BAD UGLY
|RED 12 13 14
|BLUE 5 6 7
|GREEN .1 .4 .5
|
|RED, BLUE, and GREEN are stub cells, often presented differently
|than the other cells, just as the header cells (GOOD BAD UGLY)
|are. Lots of table lack stubs, and tabular effects are often
|desired that don't need to distinguish between stubs and other
|cells in the row.
|
|Peter Flynn, other typographers, am I using "stub" correctly?
I'm but an amateur at typography and I've never heard of `stub' cells,
but I don't see why a `stub' cell is any different from a header, nor
do I see why a header has to be above the data.
If the table is essentially a list of records (a `2-dimensional'
table), it will have headers at one end only:
FIELD1 FIELD2 FIELD3
-------------------- FIELD1 | data1 data2 data3 data4
data1 data1 data1 or FIELD2 | data1 data2 data3 data4
data2 data2 data2 FIELD3 | data1 data2 data3 data4
data3 data3 data3
data4 data4 data4
If the table shows the outcome of combining two things (a
`3-dimensional' table), it will have headers on two sides:
+ | 2 3 + | 0 1
---+------ or ---+------
0 | 2 3 2 | 2 3
1 | 3 4 3 | 3 4
For more dimensions, subheaders will have to be added next to headers
that span rows or columns.
In general, the choice of whether to put headers at the side or on top
depends on the available room (there's usually more room vertically
than horizontally) and on consistency with other places where the same
table appears.
One way of solving this without the TH/TD distinction, is to define
the table model as, essentially:
<!element TABLE (THEAD?, TBODY) >
<!element THEAD (ROW+) >
<!element TBODY (ROW+) >
<!element ROW (RHEAD?, RBODY) >
<!element RHEAD (CELL+) >
<!element RBODY (CELL*) >
But on the other hand, maybe we don't want to be so strict in
HTML. After all, we want to allow some `abuse' (rather: unforeseen
usage) because there may simply be no other language available.
My favourite table model for HTML is still:
<!element TABLE (TR)+
<!element TR (TH | TD)+
with a (very) few attributes. It has headers and data, it's very
flexible and it can be created without a table editor. I hope that the
possibility for abuse will be reduced by smart table editors, that
restrict the user to sensible positions for the TH cells.
Btw. I agree that the default alignment of TH and TD should be the
same, not only does it look better, it also removes one reason for
abuse.
Bert
-- Bert Bos Alfa-informatica <bert@let.rug.nl> Rijksuniversiteit Groningen <http://www.let.rug.nl/~bert/> Postbus 716, NL-9700 AS GRONINGEN