An accountancy package, which I am converting to a web app, often has table constructs like the following:
+----------------+----------------+------------+
| DATE | ACCOUNT | BALANCE |
+----------------+----------------+------------+
| 13/06/2011 | Account One | 10.00 |
+----------------+----------------+------------+
| 13/06/2011 | Account Two | 10.00 |
+----------------+----------------+------------+
| 13/06/2011 | Account Three | 10.00 |
+----------------+----------------+------------+
| | TOTAL | 30.00 |
+----------------+----------------+------------+
The problem is the last row. TOTAL clearly has no relationship with the column header, ACCOUNT. Would it be OK if the TOTAL cell is a TH with scope=”row”? Should it also span all the columns to its left? Is this a job for TFOOT?
I’d go for a combination of the
th scope="row"and putting the<tfoot>element just after the<thead>. You might also want to put in theheadersattribute on each<td>but for such a small table it’s arguable.