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
-
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
-
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
-