HTML <th> headers Atribut

❮ HTML tag <th>

Příklad

Zadejte prvek <th>, ke kterému se vztahuje každá buňka záhlaví:

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

Definice a použití

Atribut headersurčuje jednu nebo více buněk záhlaví, ke kterým se buňka záhlaví vztahuje.

Poznámka: Atribut headersnemá v běžných webových prohlížečích žádný vizuální efekt, ale mohou jej používat programy pro čtení z obrazovky. 


Podpora prohlížeče

Attribute
headers Yes Yes Yes Yes Yes

Syntax

<th headers="header_id">

Hodnoty atributů

Value Description
header_id Specifies a space-separated list of id's to one or more header cells the header cell is related to

❮ HTML tag <th>