

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- 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 do we display a table cell in HTML
- How to specify the number of columns a table cell should span in HTML?
- How to set horizontal header for a table?
- How to set Row Header View for JScrollPane in Java?
- HTML DOM header object
- Specify a path for a file or a directory in Java
- How do we add a table row in HTML?
- How to create a subset of rows or columns of a matrix in R?
- How do we create a footer for a document or section in HTML5?
- Where should jQuery code go in header or footer?
- Indicate a dangerous action to a particular table row or cell with Bootstrap
- Indicate a successful action to a particular table row or cell with Bootstrap
- Indicate a warning action to a particular table row or cell with Bootstrap
Advertisements