English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML td rowspan attribute

The rowspan attribute defines the number of rows the cell should span. rowspan="0" tells the browser to make the cell span to the last row in the table component (thead, tbody, or tfoot).

 HTML <td> tag

Online Example

The following HTML table contains a table cell spanning two rows:

<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
<th>Vacation Savings</th>
 </tr>
 <tr>
<td>January</td>
<td>$1000</td>
<td rowspan="2">250</td>
 </tr>
 <tr>
<td>February</td>
<td>1280</td>
 </tr>
</table>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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 the cell should span.

HTML 4.01 With HTML5Differences

None.

Syntax

<td rowspan="number">

Attribute value

ValueDescription
number

Specify the number of rows the cell should span.

Note: rowspan="0" informs the browser to span the cell across the last row (thead, tbody, or tfoot) in the table component.

Chrome, Firefox, and Opera 12(and lower versions)support rowspan = "0".

More examples

The use of rowspan="0"
This example is only for Firefox and Opera browsers, demonstrating the use of rowspan="0".

 HTML <td> tag