HTML <td> with scope Attribute

You are Here:

HTML <td> with scope Attribute

The scope attribute is used to associate header cells and data cells in an HTML table.

Warning: The scope attribute is deprecated and is no longer recommended.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <table> <thead> <tr> <!-- the below cell act as a column header --> <th scope="col">S.No</th> <th scope="col">Students</th> <th scope="col">Mark</th> </tr> </thead> <tbody> <tr> <!-- the below cell act as a row header --> <td scope="row">1</td> <td>Brendon</td> <td>28.25</td> </tr> <tr> <!-- the below cell act as a row header --> <td scope="row">2</td> <td>Eich</td> <td>30.75</td> </tr> </tbody> </table> </body> </html>

Attribute Values

NameExplanation
rowSpecifies that the cell is a header for that particular row.
colSpecifies that the cell is a header for that particular column.
rowgroupSpecifies that the cell is a header for a group of rows
colgroupSpecifies that the cell is a header for a group of columns
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