The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.
This article is Almost Ready.
The caption (<caption>) element represents the title of the table that is its parent.
The caption element (<caption>) specifies a brief description for a table. The <caption> element must be inserted immediately after the <table> element.
This example uses the caption element to provide a brief description for a table.
<table> <caption>Characteristics with positive and negative sides</caption> <thead> <tr> <th>Characteristic</th> <th>Negative</th> <th>Positive</th> </tr> </thead> <tbody> <tr> <th>Mood</th> <td>Sad</td> <td>Happy</td> </tr> <tr> <th>Grade</th> <td>Failing</td> <td>Passing</td> </tr> </tbody> </table>
The caption element should be a child of the <table> element.
A caption can introduce context for a table, making it significantly easier to understand.
When a table element is the only content in a figure element other than the figcaption, the caption element should be omitted in favor of the figcaption.
|HTML 5.1||W3C Working Draft|
|HTML 5||W3C Recommendation|
|HTML 4.01||W3C Recommendation|