
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How do we specify whether a header cell is a header for a column, row, or group of columns or rows in HTML?
Use the scope attribute to implement whether a header cell is a header for a column, row, or group of columns or rows in HTML −
Example
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <h2>Cricketers</h2> <table style = "width:100%"> <caption>Indian Cricketers</caption> <th></th> <th scope = "col">Name</th> <tr> <td>1</td> <td>Sachin Tendulkar</td> </tr> <tr> <td>2</td> <td>Virat Kohli</td> </tr> </table> </body> </html>
- Related Articles
- How to add one or more header cells a cell is related to in HTML?
- Include a header for a document or section in HTML5?
- How to add header row to a Pandas Dataframe?
- How to specify the number of columns a table cell should span in HTML?
- How to set Row Header View for JScrollPane in Java?
- How to set horizontal header for a table?
- How do we display a table cell in HTML
- How do we add a table row in HTML?
- HTML DOM header object
- In HTML how to create table header?
- How to create table header in HTML?
- How can we show/hide the table header of a JTable in Java?
- Where should jQuery code go in header or footer?
- How to create a subset of rows or columns of a matrix in R?
- How to create a Non-Rectangular Header using HTML & CSS

Advertisements