X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <td> scope Attribute

HTML td Reference HTML <td> tag

Example

The following example identifies two of the <th> elements as headers for columns, and two of the <td> elements as headers for rows:

<table>
  <tr>
    <th></th>
    <th scope="col">Month</th>
    <th scope="col">Savings</th>
  </tr>
  <tr>
    <td scope="row">1</td>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td scope="row">2</td>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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


Definition and Usage

The <td> scope attribute is not supported in HTML5.

The scope attribute defines a way to associate header cells and data cells in a table.

The scope attribute identifies whether a cell is a header for a column, row, or group of columns or rows.


Syntax

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

Attribute Values

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 td Reference HTML <td> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook