×

html · level 1 · unit 6 · lesson 4

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

<th> gives each column a name.

A table is easier to read when each column has a name, like Day and Club. Put those names in the first row, using <th> instead of <td>.

A , <th>, names its column. Browsers show it in bold and centred, so it stands out from the facts below.

Screen readers use header cells too. When they read out a fact, they can say its column name first, so a lone number still makes sense.

<table>
  <tr><th>Pet</th><th>Name</th><th>Age</th></tr>
  <tr><td>Cat</td><td>Mittens</td><td>5</td></tr>
  <tr><td>Dog</td><td>Biscuit</td><td>3</td></tr>
</table>

Press show my page to see it here.

Every column gets its own <th>, even a short one like Age.