CHAPTER 4 OF 5

4. Naming and organization

Your goal: name the table and organize its rows.

Add a useful caption

A caption gives this table a recognizable name. Put it directly inside table, before the row groups. A good name helps someone decide whether to explore the table.

The outline of the table (comments mark where the actual rows go)
<table> <caption>Community workshop schedule</caption> <thead> <!-- The row of column headers belongs here. --> </thead> <tbody> <!-- The workshop rows belong here. --> </tbody> </table>

Give row groups clear jobs

The finished example

Both workshops take place at the community center. Times are local.

This reference preview includes the header relationships and caption explained across the chapters.

Community workshop schedule
Workshop Day Time
Introduction to accessible documents Tuesday 10:00 a.m.
Creating accessible tables Thursday 2:00 p.m.
Does every table require a caption?

A caption is useful for this example, but it is not automatically required in every situation to meet WCAG. Evaluate whether the table's purpose and relationships are sufficiently clear. More complicated tables may also need an explanation of their organization.

Sources and further reading