Atributo de cabeçalhos HTML <td>
Exemplo
Especifique o elemento <th> ao qual cada elemento <td> está relacionado:
<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>
Definição e uso
O headers
atributo especifica uma ou mais células de cabeçalho às quais uma célula da tabela está relacionada.
Observação: o headers
atributo não tem efeito visual em navegadores comuns, mas pode ser usado por leitores de tela.
Suporte ao navegador
Attribute | |||||
---|---|---|---|---|---|
headers | Yes | Yes | Yes | Yes | Yes |
Sintaxe
<td headers="header_id">
Valores de atributo
Value | Description |
---|---|
header_id | Specifies a space-separated list of id's to one or more header cells the table cell is related to |
❮ Tag HTML <td>