scope Attribute


 

Where to use the scope Attribute

  • As Type Enumeration (row | col | rowgroup | colgroup):
    scope is declared on the elements: th, td

Description

The scope attribute may be specified on a table cell to specify for which other cells within the table that cell is a header.

There are four possible values for scope: "row", "col", "rowgroup" and "colgroup" (although "rowgroup" and "colgroup" are not available in the *W3C XHTML 1.1 Basic Tables Module).

row
The cell is a header for the rest of the row which contains it
col
The cell is a header for the rest of the column which contains it
rowgroup
The cell is a header for the rest of the row group ( thead, tbody or tfoot ) which contains it
colgroup
The cell is a header for the rest of the column group ( see the colgroup element ) which contains it

Note that using the value "rowgroup" (or "colgroup") does not mean that the heading is to be applied to the rows (or columns) spanned by the cell's rowspan (or colspan) attribute.

For more information, see *HTML 4.01 scope Attribute Specification.

See also the headers, axis and abbr attributes.

Any given table will usually use either a scope or a headers technique for assigning headings to cells, but not both. The scope method is less cumbersome to use and is suitable for simple tables.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > scope Attribute (XHTML 1.1)