HTML <th> headers Attribute

❮ HTML <th> tag

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

<th headers="headerId">...</th>



Browser Support




Status







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.
❮ HTML <th> tag