Javascript Reference
Categories: TABLE

javascript TABLE cellSpacing

@March 15, 2008, 1:22 a.m.
cellSpacingFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  


Specifies the amount of empty space between the outer edges of each table cell. If the table has a border, the effect of setting cellSpacing is to define the thickness of borders rendered between cells. Even without a visible border, the readability of a table often benefits from cell spacing, or a combination of cell spacing and cell padding.

document.getElementById("myTable").cellSpacing = "5";

A string value for a length in pixels or percentage.


0 (with no table border); 2 (with table border).

Powered by Linode.