Basic HTML

 
 
          

Table >> Spanning >> Row Span

 

Row Span

To apply row span on your table cells, use the property rowspan="" to your <td> or <th> tag


Here are some examples:

HTML - Code Description Sample Output
<table border=1 width=100>
<tr>
<td rowspan=2>Students
<td>Girls
<tr>
<td>Boys
</table>
  • Border = 1
  • Width = 100
  • We used 2 rowspans at the first td because it will merge the two rows on its right side.
  • Students Girls
    Boys
    <table border=1 width=100>
    <tr>
    <td>Apple
    <td rowspan=2>Fruits
    <tr>
    <td>Banana
    </table>
  • Border = 1
  • Width = 100
  • Apple Fruits
    Banana
    <table border=1 width=100>
    <tr>
    <td rowspan=3>Numbers
    <td>1
    <tr>
    <td>2
    <tr>
    <td>3
    <tr>
    <td rowspan=3>Letters
    <td>A
    <tr>
    <td>B
    <tr>
    <td>C
    </table>
  • Border = 1
  • Width = 100
  • Numbers 1
    2
    3
    Letters A
    B
    C

    Table >> Spanning Table >> Spanning >> Column Span