Advertisement
Home Open Editor ❯

HTML rowspan Attribute

Example

<table>
  <tr>
    <th>Heading</th>
    <th>Heading</th>
  </tr>
  <tr>
    <td rowspan="2">Table data</td>
    <td>Table data</td>
  </tr>
  <tr>
    <td>Table data</td>
  </tr>
</table>

Try this code ❯

Meaning

The rowspan attribute takes a numeric value that indicates how many rows high a table cell should span.

This attribute is useful in defining tables with cells of different heights.


Standard Syntax

<element rowspan="number">


Applies to:

The rowspan attribute can be used on the following element:

Element Attribute
<td> rowspan
<th> rowspan

Advertisement

Attribute Values

Value Description
number The number of rows respectively that the cell is to span.
Home Open Editor ❯
Advertisement