HTMLTableElement.cellSpacing

The HTMLTableElement.cellSpacing represents the spacing around the individual cells of the table.

Syntax

JavaScript
HTMLTableElement.cellSpacing =
spacing;
var
spacing =
HTMLTableElement.cellSpacing;
  • spacing is either a number of pixels (e.g. "10") or a percentage value (e.g. "10%").

Example

JavaScript
// Set the cell spacing to 10 pixels
var t = document.getElementById('TableA');
t.cellSpacing = "10";

Specification

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

API HTML DOM HTMLTableElement NeedsCompatTable NeedsSpecTable Property Reference Référence