CARVIEW |
Select Language
HTTP/2 301
server: GitHub.com
content-type: text/html
x-origin-cache: HIT
location: https://webplatform.github.io/docs/html/elements/caption/
access-control-allow-origin: *
expires: Wed, 15 Oct 2025 23:10:49 GMT
cache-control: max-age=600
x-proxy-cache: MISS
x-github-request-id: A12F:188F0E:7241:ABA2:68F027A0
accept-ranges: bytes
age: 0
date: Wed, 15 Oct 2025 23:00:50 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210038-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760569250.815694,VS0,VE283
vary: Accept-Encoding
x-fastly-request-id: bd5665a946a539cba1c66c4b66351a2e85b340ab
content-length: 162
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
x-origin-cache: HIT
last-modified: Thu, 09 Jan 2020 08:57:10 GMT
access-control-allow-origin: *
etag: W/"5e16eae6-3ec3"
expires: Wed, 15 Oct 2025 23:10:50 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 5262:B095C:6E0D:A750:68F027A0
accept-ranges: bytes
age: 0
date: Wed, 15 Oct 2025 23:00:50 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210038-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760569250.112569,VS0,VE292
vary: Accept-Encoding
x-fastly-request-id: 57655111207be650718d903ab0481ec12ac3a509
content-length: 3382
caption ยท WebPlatform Docs
This page is Almost Ready
Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.
caption
Summary
The caption (<caption>) element represents the title of the table that is its parent.
Overview Table
The caption element (<caption>) specifies a brief description for a table. The <caption> element must be inserted immediately after the <table> element.
Examples
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>
Notes
Remarks
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.
Related specifications
See also
Related articles
HTML
caption
Text
caption