English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Usage of the rowspan attribute of the <th> tag, the rowspan attribute defines the number of rows the title cell should span, an online instance demonstrates how to use the <th> rowspan attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.
An HTML table with a title cell spanning three rows:
<table style="width:100%" border="1"> <tr> <th>Year</th> <th>Savings</th> <th rowspan="3">Buy a house and save</th> </tr> <tr> <td>2019</td> <td>$19320.00</td> </tr> <tr> <td>2020</td> <td>$28320.00</td> </tr> </table>Test it out ‹/›
Attribute | |||||
---|---|---|---|---|---|
rowspan | Yes | Yes | Yes | Yes | Yes |
Note:Only Firefox and Opera support rowspan="0", which has a special meaning (see the "Attribute Values" table below).
The rowspan attribute defines the number of rows the header cell should span.
None.
<th rowspan="number">
Value | Description |
---|---|
number | Specifies the number of rows the header cell should span. Note: The attribute rowspan="0" informs the browser to span the cell across to the last row in the table component (thead, tbody, or tfoot). |