HTML scope Attribute

❮ HTML Attributes

Example

<table>
	<tr>
		<th scope="col">Heading</th>
		<th scope="col">Heading</th>
	</tr>
	<tr>
		<td>Table data</td>
		<td>Table data</td>
	</tr>
	<tr>
		<td>Foot data</td>
		<td>Foot data</td>
	</tr>
</table>

Meaning

The scope attribute specifies the table cells for which the current cell provides header information.

Values:

This attribute can be used in place of the header attribute and is useful for rendering assistance by nonvisual browsers.

Note: If the scope attribute is not specified, or its value is not row, col, or rowgroup, or colgroup, then browsers automatically select the set of cells to which the header cell applies.




Standard Syntax

<element scope="col|row|colgroup|rowgroup">



Browser Support




Status




Applies to:

The scope attribute can be used on the following element:

Element Attribute
<th> scope






Attribute Values

Value Description
col The cell is a header for a column
row The cell is a header for a row
colgroup The cell is a header for a group of columns
rowgroup The cell is a header for a group of rows
❮ HTML Attributes