Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

HTML rowspan Attribute


Definition and Usage

The rowspan attribute specifies the number of rows a cell should span.


Applies to

The rowspan attribute can be used on the following elements:

Elements Attribute
<td> rowspan
<th> rowspan

Examples

Td Example

An HTML table with a table cell that spans two rows:

<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 »

Th Example

An HTML table with a header cell that spans three rows:

<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
    <th rowspan="3">Savings for holiday!</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>
Try it Yourself »

Browser Support

The rowspan attribute has the following browser support for each element:

Element
td Yes Yes Yes Yes Yes
th Yes Yes Yes Yes Yes