caption

FilterElements

<caption> ... </caption>

Provides a summary of a table’s contents or purpose. The caption element must immediately follow the table start tag and precede all other table elements. The align attribute is deprecated in favor of the CSS caption-side property for caption positioning.

Notes

In HTML5, if a table is the only content of a figure, use the figcaption element for the table caption instead.

Start/End Tags

Required/Required

Specifications

  • HTML 4.01
  • HTML5

align=

Values: top | bottom | left | right
Deprecated. Not in HTML5. Positions the caption relative to the table. The default position is top.

See also table.

<table>
<caption>A brief description of the data in this table.</caption>
<tr>
  <td>data</td><td>data</td>
</tr>
</table>

Rendered Example

  
A brief description of the data in this table.
datadata

Border and background styles were added to the table element to indicate its boundaries.