Open In App

HTML | rowspan Attribute

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

Syntax: 



<th rowspan="number">

Attribute Value:  

Example:  






<!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:  


Article Tags :