HTML <th> headers attribute

Definition and Usage

headers The attribute specifies one or more header cells related to a header cell.

Note:headers The attribute has no visual effect in ordinary web browsers but can be used by screen readers.

Example

Specify each <th> element related to a header cell:

<table>
  <tr>
    <th id="name" colspan="2">Name</th>
  </tr>
  <tr>
    <th headers="name">Given Name</th>
    <th headers="name">Surname</th>
  </tr>
</table>

Try It Yourself

Syntax

<th headers="header_id">

Attribute Value

Value Description
header_id Specify one or more header cells related to a header cell, separated by spaces.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support