Atributo de cabeçalhos HTML <th>

❮ Tag HTML <th>

Exemplo

Especifique o elemento <th> ao qual cada célula de cabeçalho está relacionada:

<table>
  <tr>
    <th id="name" colspan="2">Name</th>
  </tr>
  <tr>
    <th headers="name">Firsname</th>
    <th headers="name">Lastname</th>
  </tr>
</table>

Definição e uso

O headersatributo especifica uma ou mais células de cabeçalho às quais uma célula de cabeçalho está relacionada.

Observação: o headersatributo 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

<th 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 header cell is related to

❮ Tag HTML <th>