HTML headers Attribute
Example
<table>
<tr>
<th id="fname">First Name</th>
<th id="lname">Last Name</th>
</tr>
<tr>
<th headers="fname">John</th>
<th headers="lname">Doe</th>
</tr>
</table>
Meaning
The headers attribute takes a space-separated list of id values that correspond to the header cells related to this cell.
Standard Syntax
<element headers="headerId">
Browser Support
Status
Applies to:
The headers attribute can be used on the following element:
Attribute Values
Value | Description |
---|---|
headerId | The value of this attribute must have the value of an id attribute of the th element that is targeted. |
Example
<table>
<tr>
<th id="fname">First Name</th>
<th id="lname">Last Name</th>
</tr>
<tr>
<td headers="fname">John</td>
<td headers="lname">Doe</td>
</tr>
</table>