Advertisement
Home Open Editor ❯

HTML <td> headers Attribute

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>

Try this code ❯

Meaning

The headers attribute takes a space-separated list of id values that correspond to the header cells related to this cell.


Standard Syntax

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


Advertisement

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.
Home Open Editor ❯
Advertisement