Basic Tables
When the content of a simple table is descriptive on its own, only a header row or column is needed to give the user an impression of the data in the table.
If the table is larger or its content is more ambiguous, the scope
attribute should be used to avoid confusion. See Multi-directional Tables for more guidance on such tables.
Table with header cells in the top row only
The following table of concerts has the cells in the first row marked up as <th>
cells without any scope
direction. This is only acceptable because it is such a small table and the data itself is distinctly different in each column.
Note: Some screen readers will read “Date – Event – Venue” on the “Venue” cell because the direction of the <th>
elements is ambiguous.
Concerts:
Date | Event | Venue |
---|---|---|
12 February | Waltz with Strauss | Main Hall |
24 March | The Obelisks | West Wing |
14 April | The What | Main Hall |
Table with header cells in the first column only
In the following table the data from the previous example is laid out differently, with a header column on the left. Also in this situation it is acceptable not to use scope
because it is such a small table and the data itself is distinctly different in each row.
Concerts:
Date | 12 February | 24 March | 14 April |
---|---|---|---|
Event | Waltz with Strauss | The Obelisks | The What |
Venue | Main Hall | West Wing | Main Hall |
Related WCAG2.0 resources
Techniques: