Latest web development tutorials

HTML th headers attribute

HTML th tag Reference Manual HTML <th> tag

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>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Reference Manual HTML <th> tag