HTML td headers attribute
Examples
It requires that each <td> element associated with the <th> element:
<table border="1">
<tr>
<th id="name">Name</th>
<th id="email">Email</th>
<th id="phone">Phone</th>
<th id="addr">Address</th>
</tr>
<tr>
<td headers="name">John Doe</td>
<td headers="email">[email protected]</td>
<td headers="phone">+45342323</td>
<td headers="addr">Rosevn 56,4300 Sandnes,Norway</td>
</tr>
</table>
<tr>
<th id="name">Name</th>
<th id="email">Email</th>
<th id="phone">Phone</th>
<th id="addr">Address</th>
</tr>
<tr>
<td headers="name">John Doe</td>
<td headers="email">[email protected]</td>
<td headers="phone">+45342323</td>
<td headers="addr">Rosevn 56,4300 Sandnes,Norway</td>
</tr>
</table>
try it"
Browser Support
headers property has no visual effect in an ordinary Web browser, but you can use screen readers.
Definition and Usage
headers attribute specifies the table cells associated with one or more table header cell.
Differences between HTML 4.01 and HTML5
no.
grammar
<td headers="header_id">
Property Value
值 | 描述 |
---|---|
header_id | 规定表格单元格关联的一个或多个表头单元格的 id 列表,以空格间隔。 |
HTML <td> tag