HTML <caption> Tag


The caption tag defines the title of a table in the HTML document. Browsers traditionally render the text found in the <caption> tag above the table, but you can change this behavior with the CSS caption-side property.

The <caption> tag must be inserted immediately after the <table> tag.

Tips: By default, a table caption will be center-aligned above a table. However, the CSS properties text-align and caption-side can be used to align and place the caption.

Syntax

Example

Preview

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<caption> Yes Yes Yes Yes Yes