HTML | rowspan Attribute
Last Updated :
01 Aug, 2022
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 1 and above
- Edge 12 and above
- Internet Explorer
- Firefox 1 and above
- Safari
- Opera
Share your thoughts in the comments
Please Login to comment...