<caption>
Give a table title that screen readers announce
<caption> — The table title
The <caption> element is the title of a <table>. It is placed immediately after the opening <table> tag and describes the table content for all users.
When to use it
You have a table and you want to provide context before the user dives into the data. Prefer <caption> over a <p> placed above the table: <caption> is programmatically associated with the table, not just visually adjacent.
What you gain
Accessibility: screen readers announce the <caption> when the user enters the table. Without it, the user discovers the table content cell by cell without knowing what it is about. An adjacent <p> is not read automatically.
Code example
<table>
<caption>Browser support for the dialog element (2026)</caption>
<thead>
<tr>
<th scope="col">Browser</th>
<th scope="col">Version</th>
<th scope="col">Support</th>
</tr>
</thead>
<tbody>
<tr>
<td>Chrome</td>
<td>37+</td>
<td>Full</td>
</tr>
<tr>
<td>Firefox</td>
<td>98+</td>
<td>Full</td>
</tr>
</tbody>
</table>Further reading
- Tables are not the enemy — structuring an accessible table
- WHATWG —
<caption> - W3C — Table captions
- MDN —
<caption>