th, scope, and the caption Element
Give a table a title and proper header cells.
Data Tables Carry Meaning
A real data table shows relationships between rows and columns. Mark it up well and screen readers can announce which header each value belongs to.
A Plain Table Is Confusing
If every cell is just a td, a screen reader reads numbers with no context. The user hears values but never learns what they mean.
<table>
<tr><td>Name</td><td>Score</td></tr>
<tr><td>Ada</td><td>92</td></tr>
</table>All lessons in this course
- th, scope, and the caption Element
- Row and Column Headers Done Right
- Complex Tables: headers and id Pairing
- Layout Tables Are a Trap