The Wayback Machine - https://web.archive.org/web/20160913052817/https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement/cellPadding

The MDN team is furthering its investment in its community and we'd love to hear about your journey as an MDN contributor. If you want to help, please take 5 minutes to answer this survey: https://mzl.la/mdn-survey-oct2016

HTMLTableElement.cellPadding

The HTMLTableElement.cellPadding property represents the padding around the individual cells of the table.

Syntax

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

// Set cell padding to 10 pixels
var t = document.getElementById("TableA");
t.cellPadding = "10";

Specification

Document Tags and Contributors

 Contributors to this page: teoli, kscarfone, Sheppy, ethertank, RobG, Dria, JesseW
 Last updated by: teoli,