Web design and digital-business ideas grounded in real tasks.

A table caption helps readers know what the numbers belong to

A web designer comparing a data table layout on laptop and tablet, screen text not legible, no logos.
AI-generated photographic illustration; not documentary photography.

A table begins with “Monday, Tuesday, Wednesday”, followed by numbers. Are they bookings, temperatures or staff hours? A nearby paragraph may explain, but readers navigating directly to the table still need a clear way to identify it.

The HTML caption element gives the table a title or description associated with that table. MDN’s caption reference describes its role and placement as the first child of the table.

Name the data, scope and unit

“Community room bookings, week beginning 12 October, hours” is more informative than “Weekly figures”. Choose the details that distinguish this table from another one on the same page.

A short example with invented data is:

<table>
  <caption>Room bookings on Monday, hours</caption>
  <tr><th scope="col">Room</th>
      <th scope="col">Hours</th></tr>
  <tr><th scope="row">Studio</th>
      <td>4</td></tr>
</table>

The caption identifies the table. The headers identify the relationships within it. One does not replace the other.

Check it away from the surrounding paragraph

Read the caption and column headers on their own. Can you tell what each value represents and which period or population it covers? If the answer depends on a paragraph several screens above, add the essential context to the table’s own labelling.

Keep extensive analysis outside the caption. A title that becomes a long essay can make navigation cumbersome. Place detailed methodology or qualifications nearby and connect them clearly when needed.

Test the result with keyboard navigation and the assistive technologies used in your accessibility review. Also inspect it on a narrow screen: a useful caption should remain readable without forcing the page wider.

When data changes, review the caption too. An accurate set of new numbers under an old date is still a misleading table. Treat its title, headers and values as one publishing unit.