HTML <th> with scope Attribute
HTML <th> with scope Attribute
The scope
attribute specifies whether a header cell is a header for a row, column, rowgroup, or colgroup.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<th scope="col">S.No</th>
<th scope="col">Name</th>
</tr>
<tr>
<td>1</td>
<td>Brendan</td>
</tr>
<tr>
<td>2</td>
<td>Eich</td>
</tr>
</table>
</body>
</html>
Attribute Value
Value | Explanation |
---|---|
row | Specifies that the cell is the header for the row it belongs to. |
col | Specifies that the cell is the header for the col it belongs to. |
rowgroup | Specifies that the cell is the header for the group of row it belongs to. |
colgroup | Specifies that the cell is the header for the group of column it belongs to. |
auto | Default Behavior. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.