HTML <th> bereik Attribuut

❮ HTML <th>-tag

Voorbeeld

Geef op dat de twee koptekstcellen kopteksten voor kolommen zijn:

<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>

Definitie en gebruik

Het scopekenmerk geeft aan of een koptekstcel een koptekst is voor een kolom, rij of groep kolommen of rijen.

Opmerking: het scopeattribuut heeft geen visueel effect in gewone webbrowsers, maar kan worden gebruikt door schermlezers. 


Browserondersteuning

Attribute
scope Yes Yes Yes Yes Yes

Syntaxis

<th scope="col|row|colgroup|rowgroup">

Attribuutwaarden

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 <th>-tag