Skip to content
Related Articles

Related Articles

Improve Article

HTML | rowspan Attribute

  • Last Updated : 03 Jul, 2021
Geek Week

The HTML <th> rowspan Attribute is used to specify how many numbers of header row cell will span. 
Syntax: 

<th rowspan="number">

Attribute Value:  

  • number: It contains the numeric value which specifies the number of  rows the header cell should span.

Example:  

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML th rowspan Attribute
    </title>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
 
    <h2>HTML th rowspan Attribute</h2>
 
    <table border="1" width="500">
        <tr>
            <th>NAME</th>
            <th rowspan="3">AGE</th>
            <th>BRANCH</th>
        </tr>
 
        <tr>
            <td>BITTU</td>
            <td>CSE</td>
        </tr>
 
        <tr>
            <td>RAKESH</td>
            <td>EC</td>
        </tr>
    </table>
</body>
 
</html>

Output:  



Supported Browsers: The browser supported by HTML <th> rowspan attribute are listed below:  

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

 

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :