cellPadding
Summary
Specifies the space, in pixels, between the cell wall and the cell content. Not supported in HTML5. Use CSS.
Applies to | ? |
---|
The cellpadding attribute specifies the space between each cell stroke. Value has to be a number, and is interpreted as a size in pixels.
Note: Do not confuse this with the cellspacing attribute, which specifies the space between cells.
Tip: It may be better to NOT specify a cellpadding, and use CSS to apply padding instead.
Examples
Here is a table where we use the cellpadding
and border
table attributes.
<table border="1" cellpadding="10">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>0</td>
</tr>
</table>
Related specifications
- Document Object Model (DOM) Level 1, Section 2.5.5
- Recommendation
- HTML 4.01 Specification, Section 11.3.3
- Recommendation
See also
Related pages
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]