scope (HTML attribute)
Example
‘Acme Industries’ is associated with all the cells in that row:
<tr> <th>Company</th> <th>Employees</th> <th>Founded</th> </tr> <tr> <td scope="row">Acme Industries</td> <td>1000</td> <td>1978</td> </tr>
Description
The scope
attribute provides a mechanism for associating the cell to which the
attribute is applied with a column or row of data. Normally this is used
in the context of a table header - the th element - but may be used
validly with a td element.
Value
The most common attributes you will
use with scope are "col" and
"row". However, if you have also marked up your
table with colgroup elements, you
can make use of the matching "colgroup" value to
associate the header with all the columns in that colgroup. There is one
other attribute available, namely "rowgroup", which
applies to a cell that is spanned using the rowspan
attribute.
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
Difficult to state browser compatibility - this is more of a question of how well the assistive technology copes with this information. Regardless, it is the correct thing to do, so you should make the effort to ensure that if you have complex tables that you mark them up accordingly to ensure that the data is accessible for all.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

