<table cellpadding="">

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

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


<table cellpadding="3"></table>

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

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