Tables : Lesson 4
Cell Padding and Cell Spacing
Cell Padding is the amount of space between text and boundaries of a cell.
Cell Spacing is the distance between two cells.
Without cellpadding or cellspacing:
With cellpadding:
With cellpadding and cellspacing:
<h4>Without cellpadding or cellspacing:</h4>
<table border="1">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
<h4>With cellpadding:</h4>
<table border="1" cellpadding="10">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
<h4>With cellpadding and cellspacing:</h4>
<table border="1" cellpadding="10" cellspacing="15">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
I think this is self-explanatory.