Briefly
The border
property sets the spacing between the borders of table cells.
Example
table { border-spacing: 10px;}
table { border-spacing: 10px; }
How to write
You can specify one or two non-negative values:
border
— the distance between cells is the same on all sides.- spacing : 1px border
— the first value sets the distance between cells horizontally, the second — vertically.- spacing : 1px 2px
How to understand
The border
property sets the distance between table cells. This property works only for tables with the border
property set to separate
.
Spacing will also appear around the table, so the distance between the table cells and its border will be the sum of the border
values and the padding
of the table.