Controlling cell padding

To add space around the content of a cell, use cellpadding in the table tag. Here are some examples:

Examples showing different cell padding values
0 0
0 0
0 Pixel
1 1
1 1
1 Pixel
5 5
5 5
5 Pixels
10 10
10 10
10 Pixel

If you wanted to create a table with cellpadding of 5 pixels, use the following code:

<table width="40" border="1" cellpadding="5">
<tr>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>5</td>
<td>5</td>
</tr>
</table>