HTML Attributes

HTML scope attribute

Specifies the table cells for which a th acts as a header. Missing scope uses automatic association; use explicit relationships for complex tables. Applicable elements include: <th>. Check each element’s value rules.

Formal Syntax & Structure

html syntaxhtml
scope="col"

Parameters & Attributes

NameTypeDescription
scopeenumerated: row, col, rowgroup, colgroupSpecifies the table cells for which a th acts as a header. Missing scope uses automatic association; use explicit relationships for complex tables.

Working Example

Example Snippethtml
<table>  <tr>    <th scope="col">Product</th>    <th scope="col">Price</th>  </tr>  <tr>    <td>Pen</td>    <td>$2</td>  </tr></table>
HTML Reference