English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Directory

HTML: <th> headers attribute

Usage of <th> headers attribute, the headers attribute specifies one or more header cells associated with the table header cell, online examples demonstrate how to use the <th> headers attribute, browser compatibility, syntax definition, and detailed information about its attribute values.

 HTML <th> tag

Online Example

Specify the related <th> element for each title cell:

<table style="width:100%" border="1">
  <tr>
    <th id="name" colspan="2">Full Name</th>
  </tr>
  <tr>
    <th headers="name">Last Name</th>
    <th headers="name">Name</th>
  </tr>
</table>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

The headers attribute has no visual effect in a standard web browser, but can be used by screen readers.

Definition and Usage

The headers attribute specifies one or more header cells associated with the header cell.

HTML 4.01 with HTML5differences

The headers attribute in HTML5 is a new attribute of the <th> tag in HTML.

Syntax

<th headers="header_id">

Attribute Value

ValueDescription
header_idSpecifies a list of one or more header cells associated with the header cell, separated by spaces.
 HTML <th> tag