spacing within cells


<table cellpadding="">

Browser
Internet Explorer Firefox Opera
Type
Block-level

The cellpadding attribute of the TABLE element specifies the cell padding (the space within cells).


<table cellpadding="3">


Attribute Value Explanation
cellpadding=" " pixels or % the size of the padding
Tips and Notes

This can be specified with CSS. Please see the "Related Document" for details on CSS.


Example

The cellpadding is 0

<table border="1" cellpadding="0">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
Output
Cell A Cell B Cell C

The cellpadding is 5

<table border="1" cellpadding="5">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
Output
Cell A Cell B Cell C

The cellpadding is 15

<table border="1" cellpadding="15">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>
Output
Cell A Cell B Cell C