HTMLTableElement.cellPadding
The HTMLTableElement.cellPadding
property represents the padding around the individual cells of the table.
Syntax
JavaScript
Copy Code
HTMLTableElement.cellPadding =
padding;
var
padding =
HTMLTableElement.cellPadding;
padding
is either a number of pixels (e.g. "10") or a percentage value (e.g. "10%").
Example
JavaScript
Copy Code
// Set cell padding to 10 pixels var t = document.getElementById("TableA"); t.cellPadding = "10";
Specification
- W3C DOM 2 HTML Specification HTMLTableElement .cellPadding.
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/htmltableelement/cellpadding