HTMLTableElement: caption property
The HTMLTableElement.caption property represents the
table caption. If no caption element is associated with the table, this property is
null.
Value
A string.
Examples
js
if (table.caption) {
// Do something with the caption
}
Specifications
| Specification |
|---|
| HTML Standard # dom-table-caption-dev |
Browser compatibility
| desktop | mobile | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
caption | |||||||||||
See also
- The interface implementing this property:
HTMLTableElement.