Name

SCOPE — NN n/a IE n/a HTML 4

Synopsis

SCOPE=”scopeConstant"

Optional

Used more with a TH element than with a TD element, the SCOPE attribute sets the range of cells (relative to the current cell) that behave as though the current cell is the header for those cells. For tables whose structure is quite regular, the SCOPE attribute is a simpler way of achieving what the HEADERS attribute does, without having to define ID attributes for the header cells.

Example

<TR>
<TH SCOPE="col">Product Number
<TH SCOPE="col">Description
</TR>
<TR>
<TD>0392
<TD>Round widget
</TR>

Value

One of four recognized scope constants:

col

Current cell text becomes header text for every cell in the rest of the column.

colgroup

Current cell text becomes header text for every cell in the rest of the COLGROUP element.

row

Current cell text becomes header text for every cell in the rest of the TR element.

rowgroup

Current cell text becomes header text for every cell in the rest of the TBODY element.

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.