HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Set the space between cells in a table
The borderSpacing property sets or returns the space between cells in a table.
Property | |||||
---|---|---|---|---|---|
borderSpacing | Yes | 9.0 | Yes | Yes | Yes |
Return the borderSpacing property:
Set the borderSpacing property:
Value | Description |
---|---|
length length | Specifies the space between cells in length units. Negative values are not allowed. Default value is 0.
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 0 |
---|---|
Return Value: | A String, representing the space between cells in a table |
CSS Version | CSS2 |
Return the space between cells in a table:
alert(document.getElementById("myTable").style.borderSpacing);
CSS tutorial: CSS Table
CSS reference: border-spacing property