Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<caption>

The title of a table.

Syntax

<table><caption>Title</caption>…</table>

Examples

A caption above the table:

<table>
  <caption>Opening hours</caption>
  <tr><th>Mon–Fri</th><td>8:00–21:00</td></tr>
  <tr><th>Sat–Sun</th><td>10:00–18:00</td></tr>
</table>

Notes

<caption> must be the first element inside <table>. Move it with the CSS caption-side: bottom property. Screen readers announce the caption before the table.

See also

In the tutorial

  • Tables — Tables in HTML — rows and cells, column headers, thead, tbody, tfoot and caption, merging cells.

Thanks for reading!

Donate to the site — we work hard for you.