HTML <td> rowspanAttribute
Examples
The following HTML table contains a table cell that spans two rows:
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan="2">$50</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan="2">$50</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Try it Yourself »
(More examples at the bottom of the page)
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the rowspan attribute.
Note:Only Firefox and Opera support rowspan="0", which has a special meaning (see the "Attribute Values" table below).
Definition and Usage
The rowspan attribute defines the number of rows a cell should span.
Differences between HTML 4.01 and HTML5
None.
Syntax
<td rowspan="number">
Attribute Values
| Value | Description |
|---|---|
| number | Specifies the number of rows a cell should span.Note:rowspan="0" tells the browser to make the cell span to the last row of the table section (thead, tbody, or tfoot). |
More Examples
Usage of rowspan="0"
This example only works in Firefox and Opera browsers, and demonstrates the use of rowspan="0".
HTML <td> Tag Other Extensions