Since I always forget that you can have any cell marked as th
to make it a header: [WayBack] Tables with two headers • Tables • WAI Web Accessibility Tutorials.
This is not just limited to top rows, you can use it any where:
- in the left column
- in any other row
- in any other column
- in individual cells
In addition, a table
can also have a caption
, which is not just useful for screen-readers: it benefits general readability.
Quoting the page:
For such tables, use the
<th>
element to identify the header cells and thescope
attribute to declare the direction of each header. Thescope
attribute can be set torow
orcol
to denote that a header applies to the entire row or column, respectively.Additionally, you can use the
<caption>
element to identify the table in a document. This is particularly useful for screen-reader users browsing the web page in “table mode” where they can navigate from table to table.
Examples on that page:
–jeroen