Tag th

A tag th define uma célula de cabeçalho em uma tabela HTML.

Por padrão, o texto em uma célula de cabeçalho é centralizado e em negrito. Esse comportamento pode ser alterado usando as propriedades CSS text-align e font-weight.

Exemplo

Vamos criar uma tabela com células th e td:

html<table>
  <tr>
    <th>Nome</th>
    <th>Sobrenome</th>
    <th>Salário</th>
  </tr>
  <tr>
    <td>nome1</td>
    <td>sobrenome1</td>
    <td>200$</td>
  </tr>
  <tr>
    <td>nome2</td>
    <td>sobrenome2</td>
    <td>1000$</td>
  </tr>
</table>
csstable, td, th {
  border: 1px solid black;
}

Результат:

Veja também