HTML <th> headersProperty
Example
Specifies the <th> elements associated with each header cell:
<table>
<tr>
<th id="name" colspan="2">Name</th>
</tr>
<tr>
<th headers="name">Firsname</th>
<th headers="name">Lastname</th>
</tr>
</table>
<tr>
<th id="name" colspan="2">Name</th>
</tr>
<tr>
<th headers="name">Firsname</th>
<th headers="name">Lastname</th>
</tr>
</table>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
The headers attribute has no visual effect in ordinary Web browsers, but can be used by screen readers.
Definition and Usage
The headers attribute specifies one or more header cells associated with a header cell.
Differences between HTML 4.01 and HTML5
The headers attribute is a new attribute of the <th> tag in HTML5.
Syntax
<th headers="header_id">
Property value
| Value | Description |
|---|---|
| header_id | Specifies a space-separated list of ids of one or more header cells to which the header cell is associated. |
HTML <th> Tagother extensions