Tables for Actual Tabular Data
What this is. A table is for data with two dimensions, where a cell means something because of both its row and its column. A price list, a schedule, a comparison.
When not to use one. Tables were once used to lay out entire pages. That is obsolete and actively harmful, because a screen reader announces a table as a table and tries to describe its rows and columns. CSS Grid, which you will meet in Part II, is what layout is for now.
The parts. caption names the table. thead holds the header row, tbody the data. th is a header cell and td is a data cell. The scope attribute on a th says whether it heads a column or a row, which is what lets a screen reader announce the right header alongside each value.
Mark this lesson complete
Signed in, your progress follows you to every device.