HTML <th> headers attribute
Definition and usage
headers
The attribute specifies one or more header cells related to the header cell.
Note:headers
Attributes have no visual effect in ordinary web browsers but can be used by screen readers.
Example
Specify each <th> element related to each header cell:
<table> <tr> <th id="name" colspan="2">Name</th> </tr> <tr> <th headers="name">Name</th> <th headers="name">Surname</th> </tr> </table>
Syntax
<th headers="header_id">
Attribute value
Value | Description |
---|---|
header_id | Specify one or more id lists of one or more header cells related to the header cell, separated by spaces. |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |