HTML Table: An example on using rowspan

This entry is part 9 of 16 in the series HTML Table

Row span allows a row to span over multiple columns.

To implement rowspan:

<td rowspan='2'>

Notice there are only 2 <td> in the last row.

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title> Table</title>

<table border='1' width='80%'>
        <td rowspan='2'>British</td>
        <td>Rod Stewart</td>
        <td>Maggie May</td>


We can align the first column using align=’center’.

<td rowspan='2' align='center'>British</td>

Series Navigation<< HTML Table: Spanning or merging table cells
HTML Table: Inserting an image to a row spanning column >>

Leave a comment

Leave a Reply