English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Usage of the <th> scope attribute, the scope attribute specifies whether a header cell is a column, row, group of columns, or group of rows, an online example demonstrates how to use the <th> scope attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
Specify two header cells as column headers:
<table style="width:100%" border="1"> <tr> <th>ID</th> <th scope="col">Year</th> <th scope="col">Savings</th> </tr> <tr> <td>1</td> <td>2018</td> <td>$19320.00</td> </tr> <tr> <td>2</td> <td>2019</td> <td>$28320.00</td> </tr> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
The scope attribute has no visual effect in regular web browsers, but it can be used by screen readers.
The scope attribute specifies whether a header cell is a column, row, column group, or row group header.
None.
<th scope="col|row|colgroup|rowgroup">
Value | Description |
---|---|
col | Specifies that the cell is a header of a column. |
row | Specifies that the cell is a header of a row. |
colgroup | Specifies that the cell is a header of a column group. |
rowgroup | Specifies that the cell is a header of a row group. |