Attributo di ambito HTML <th>
Esempio
Specifica che le due celle di intestazione sono intestazioni per le colonne:
<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>
Definizione e utilizzo
L' scope
attributo specifica se una cella di intestazione è un'intestazione per una colonna, riga o gruppo di colonne o righe.
Nota: l' scope
attributo non ha alcun effetto visivo nei normali browser Web, ma può essere utilizzato dagli screen reader.
Supporto browser
Attribute | |||||
---|---|---|---|---|---|
scope | Yes | Yes | Yes | Yes | Yes |
Sintassi
<th scope="col|row|colgroup|rowgroup">
Valori di attributo
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 |
❮ Tag HTML <th>