HTML and CSS Reference
In-Depth Information
Name
caption
Synopsis
<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.
Note
If the
table
is the only content of a
figure
, use the
figcaption
element instead.
Usage
Categories:
None
Permitted contexts:
As the first child of a
table
element
Permitted content:
Flow content, but may not contain
table
elements
Start/end tags:
Required/Required
Attributes
HTML5 Global Attributes
Example
<table>
<caption>
A brief description of the data in this table.