Atribut rozsahu HTML <th>
Příklad
Určete, že dvě buňky záhlaví jsou záhlaví sloupců:
<table>
<tr>
<th></th>
<th scope="col">Month</th>
<th scope="col">Savings</th>
</tr>
<tr>
<td>1</td>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>2</td>
<td>February</td>
<td>$80</td>
</tr>
</table>
Definice a použití
Atribut scope
určuje, zda je buňka záhlaví záhlavím sloupce, řádku nebo skupiny sloupců či řádků.
Poznámka: Atribut scope
nemá 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 | |||||
---|---|---|---|---|---|
scope | Yes | Yes | Yes | Yes | Yes |
Syntax
<th scope="col|row|colgroup|rowgroup">
Hodnoty atributů
Value | Description |
---|---|
col | Specifies that the cell is a header for a column |
row | Specifies that the cell is a header for a row |
colgroup | Specifies that the cell is a header for a group of columns |
rowgroup | Specifies that the cell is a header for a group of rows |
❮ HTML tag <th>