The HTMLTableElement.cellPadding
property represents the padding around the individual cells of the table.
SyntaxEdit
HTMLTableElement.cellPadding = padding; var padding = HTMLTableElement.cellPadding;
padding
is either a number of pixels (e.g. "10") or a percentage value (e.g. "10%").
ExampleEdit
// Set cell padding to 10 pixels
var t = document.getElementById("TableA");
t.cellPadding = "10";
SpecificationEdit
- W3C DOM 2 HTML Specification HTMLTableElement .cellPadding.