HTML th headers attribute
Examples
It requires that each header cell associated with the <th> element:
<table>
<tr>
<th id="name" colspan="2">Name</th>
</tr>
<tr>
<th headers="name">Firsname</th>
<th headers="name">Lastname</th>
</tr>
</table>
<tr>
<th id="name" colspan="2">Name</th>
</tr>
<tr>
<th headers="name">Firsname</th>
<th headers="name">Lastname</th>
</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 header cell with one or more table header cell associated.
Differences between HTML 4.01 and HTML5
headers property is a new property in HTML5 <th> tag.
grammar
<th headers="header_id">
Property Value
值 | 描述 |
---|---|
header_id | 规定表头单元格关联的一个或多个表头单元格的 id 列表,以空格间隔。 |
HTML <th> tag