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

HTML Reference Manual

Complete List of HTML Tags

HTML td scope attribute

The scope attribute defines how the header cells and data cells in the table are associated. The scope attribute identifies the cell as a column, row, or a group of columns or rows header.

 HTML <td> tag

Online Example

The following example identifies two <th> elements as column headers and two <td> elements as row headers:

<table style="width:100%" border="1>
  <tr>
    <th>Number</th>
    <th scope="col">Month</th>
    <th scope="col">Savings</th>
  </tr>
  <tr>
    <td scope="row">1</td>
    <td>January</td>
    <td>3100</td>
  </tr>
  <tr>
    <td scope="row">2</td>
    <td>February</td>
    <td>2180</td>
  </tr>
</table>
Test See ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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

Definition and Usage

HTML5 The <td> scope attribute is not supported.

The scope attribute defines the method for associating header cells with data cells in a table.

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

Syntax

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

Attribute Value

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