- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML rowspan Attribute
The HTML rowspan attribute define the number of rows a cell of a table should span in an HTML document. It can only be applied on td or th HTML element.
Syntax
Following is the syntax −
<tagname rowspan=”number”></tagname>
Let us see an example of HTML rowspan Attribute −
Example
<!DOCTYPE html> <html> <style> body { color: #000; background: lightblue; height: 100vh; text-align: center; } table { margin: 2rem auto; width: 400px; } </style> <body> <h1>HTML rowspan Attribute Demo</h1> <table border="2"> <thead> <tr> <th>Name</th> <th>Language</th> </tr> <thead> <tbody> <tr> <td>John</td> <td>English</td> </tr> <tr> <td rowspan="2">Elon</td> <td>Germany</td> </tr> <tr> <td>French</td> </tr> </tbody> </table> </body> </html>
Output
Advertisements