English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The td headers attribute specifies one or more header cells associated with the table cell. The headers attribute has no visual effect in ordinary web browsers, but it can be used by screen readers.
Specify the <th> element associated with each <td> element:
<table style="width:100%" border="1"> <tr> <th id="name">Name</th>/th> <th id="email">Email Address</th>/th> <th id="phone">Phone Number</th>/th> <th id="address">Address</th> </tr> <tr> <td headers="name">Ma Liu</td> <td headers="email">[email protected]</td> <td headers="phone">+13212345678</td> <td headers="address">Shanghai Minhang District</td> </tr> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
The headers attribute has no visual effect in a standard web browser, but can be used by screen readers.
The headers attribute specifies one or more header cells associated with the table cell.
None.
<td headers="header_id">
Value | Description |
---|---|
header_id | Specifies a list of one or more header cells related to the table cell, separated by spaces. |