A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-td-scope-attribute/ below:

HTML | <td> scope Attribute

HTML | <td> scope Attribute

Last Updated : 06 Jan, 2022

The

HTML <td> scope Attribute

is used to

specify the cell is used for header row, column, colgroup or rowgroup

. This attribute does not display any visual effect on the browser but it is used for screen readers.

Note: This attribute is not supported by HTML5.

Syntax:
<td scope="col | row | colgroup | rowgroup">
Attribute Values: Example: html
<!DOCTYPE html>
<html>

<head>
    <title>HTML scope Attribute</title>
    <style>
        table,
        th,
        td {
            border: 1px solid black;
            border-collapse: collapse;
            padding: 6px;
        }
    </style>
</head>

<body style="text-align:center">

    <h1 style="color: green;">GeeksforGeeks</h1>
    <h2>HTML <td>scope Attribute</h2>
    <center>
        <table>
            <tr>
                <th>Name</th>
                <th>Age</th>
            </tr>
            <tr>
                <td scope="col">Ajay</td>
                <!-- This cell will take up space on 
                    two rows -->
                <td>24</td>
                <td>24</td>
                <td>44</td>
            </tr>
            <tr>
                <td>Priya</td>
            </tr>
        </table>
    </center>

</body>

</html>
Output: Supported Browsers:

The browsers supported by

HTML <td> scope Attribute

are listed below:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4