"> " />
Easy Tutorial
❮ Canvas Textalign Att Img Usemap ❯

HTML <th> rowspan Attribute

HTML <th> Tag

Example

The following HTML table contains a header cell that spans across three rows:

<table border="1">
  <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>

Browser Support

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).


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
number Specifies the number of rows the header cell should span. Note: rowspan="0" tells the browser to make the cell span to the last row of the table component (thead, tbody, or tfoot).

More Examples

Using rowspan="0"


❮ Canvas Textalign Att Img Usemap ❯