HTML ème attribut de portée
Exemples
La cellule deux en-tête est définie comme un en-tête de colonne:
<table border="1">
<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>
<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>
Essayez »
support du navigateur
attribut scope pas d'effets visuels dans un navigateur Web ordinaire, mais vous pouvez utiliser les lecteurs d'écran.
Définition et utilisation
attribut scope spécifie si une cellule d'en-tête est un groupe d'en-tête colonne, ligne, colonne ou groupe de lignes.
Différences entre HTML 4.01 et HTML5
Aucun.
grammaire
<th scope="col|row|colgroup|rowgroup">
Valeur de la propriété
值 | 描述 |
---|---|
col | 规定单元格是列的表头。 |
row | 规定单元格是行的表头。 |
colgroup | 规定单元格是列组的表头。 |
rowgroup | 规定单元格是行组的表头。 |
HTML <th> tag