Advertisement
Home Open Editor ❯

HTML <td> 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

<td rowspan="number">...</td>


Advertisement

Attribute Values

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