HTML rowspan attribute

rowspan attribute allows a cell to span more than one rows. It merges two cells to span two rows.

rowspan attribute value

The value of this attribute is a valid positive integer. The integer is the number of rows spanned by the cell.

The following example uses both rowspan and colspan attributes.

colspan attribute allows a cell to span two columns.

The zero value indicates that the cell is to span all the remaining rows.

Related Tags

The tags which support this attribute are as follows.

<th> tag

<th> tag defines a data cell for the heading section in a table. It supports rowspan attribute.

<td> tag

<td> defines a data cell for the body section in a table.



Was this article helpful?

 

Email:

Message:

Get the newsletter