| Depr. | Version |
|---|---|
| No | HTML 4 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Full | Full | Full | Full | Full |
Syntax
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 attribute is used in the context of a table
header—the th element—but it may
be used validly with a td
element.
Example
The information “Acme Industries” is associated with all the cells in its 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>
Value
The most common attributes you’ll use with
scope are "col" and
"row". However, if you’ve 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. One other attribute is available:
"rowgroup", which applies to a cell that’s spanned
using the rowspan attribute.
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full |
It’s
difficult to accurately state the browser compatibility for this
attribute, as the issue depends on how well the assistive technology copes
with this information. Regardless, using the scope
attribute for simple tables helps to provide users with specific needs
(primarily blind users) access to the data contained in the
table.
User-contributed notes
There are no comments yet.