Table Tutor - Lesson 11

Now get rid of all that stuff, bring back Tom and Rick and we'll dive into rowspan.

 
<table border="3">
 
<tr>
<td>Ed</td>
<td>Tom</td>
<td>Rick</td>
</tr>
 
<tr>
<td>Larry</td>
<td>Curly</td>
<td>Moe</td>
</tr>
 
</table>

Ed

Tom

Rick

Larry

Curly

Moe


As you may have guessed, rowspan is just like colspan cept y'all span rows instead of columns. (Not exactly brain surgery... is it?)

If we remove Larry and let Ed take over his cell, this is the result.

 
<table border="3">
 
<tr>
<td rowspan="2">Ed</td>
<td>Tom</td>
<td>Rick</td>
</tr>
 
<tr>
<td>Curly</td>
<td>Moe</td>
</tr>
 
</table>

Ed

Tom

Rick

Curly

Moe


And of course, these attributes can also be used in combination.

 
<table border="3">
 
<tr>
<td rowspan="2">Ed</td>
<td colspan="2">Tom</td>
</tr>
 
<tr>
<td>Curly</td>
<td>Moe</td>
</tr>
 
</table>

Ed

Tom

Curly

Moe

Just be careful though... too many rowspans and colspans cris-crossing all over the place and you're going to have one confusing mess of a table to sort out. Remember KISS... Keep It Simple Stupid.

<< BACK NEXT >>