HTML <th> with scope Attribute

You are Here:

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

ValueExplanation
rowSpecifies that the cell is the header for the row it belongs to.
colSpecifies that the cell is the header for the col it belongs to.
rowgroupSpecifies that the cell is the header for the group of row it belongs to.
colgroupSpecifies that the cell is the header for the group of column it belongs to.
autoDefault 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.

Share this Page

Meet the Author