HTMLTableCellElement: scope property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The Header cells can be configured, using the Note:
This property doesn't have a visual effect in browsers. It adds semantic information to help assistive technology like screen readers to present the table in a more coherent way. One of the following values: The header cell applies to the following cells in the same column (or columns, if The header cell applies to all cells in the current column group that do not already have a scope applied to them. This value is only allowed if the cell is in a column group. The header cell applies to the following cells in the same row (or rows, if The header cell applies to all cells in the current row group that do not already have a scope applied to them. This value is only allowed if the cell is in a row group. The header cell has no predefined scope; the user agent will establish the scope based on contextual clues. This example adds a label all the cell numbers of the first row of the scope
property of the HTMLTableCellElement
interface
indicates the scope of a cell.
scope
attribute, to apply to a specified row or column, or to the not-yet-scoped cells within the current row group (that is, the same ancestor ,
, or
element). If no value is specified for
scope
, the header is not associated directly with cells in this way. Permitted values for scope
are:
Value
col
colspan
is used as well), until either the end of the column or another in the column establishes a new scope.
colgroup
row
rowspan
is used as well), until either the end of the row or another in the same row establishes a new scope.
rowgroup
""
)Examples
tbody
.HTML
Dam
Country
Height
1.
Jinping-I Dam
China
305 m
2.
Nurek Dam
Tajikistan
300 m
3.
Lianghekou Dam
China
295 m
4.
Xiowan Dam
China
292 m
5.
Balhetan Dam
China
289 m
6.
Xiluodu Dam
China
285.5 m
7.
Grande-Dixence Dam
Switzerland
285 m
Results
Specifications
Specification HTML
# dom-th-scopeBrowser compatibility