English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML: <th> scope attribute

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.

 HTML <th> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

The scope attribute has no visual effect in regular web browsers, but it can be used by screen readers.

Definition and Usage

The scope attribute specifies whether a header cell is a column, row, column group, or row group header.

HTML 4.01 and HTML5The Difference Between

None.

Syntax

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

Attribute Value

ValueDescription
colSpecifies that the cell is a header of a column.
rowSpecifies that the cell is a header of a row.
colgroupSpecifies that the cell is a header of a column group.
rowgroupSpecifies that the cell is a header of a row group.
 HTML <th> tag