cellSpacing attribute (table)
Sets the amount of space between the border of the cells in a table.
Use the cellPadding attribute if you want to set the space between the border and contents of the cell.
JavaScript page for this attribute: cellSpacing. You can find other example(s) there. |
Possible values:
Sets the amount of space between cells.
One of the following values:
Integer with or without a px (pixel) designator. | |||||||
Integer higher than or equal to 0 , with a % designator. |
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the cellSpacing attribute:
|
||||
Table, with 10px cellspacing: <table border="3px" cellspacing="10px"> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> <br /><br /> Table, without cellspacing: <table border="3px" cellspacing="0px"> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
Related pages:
External links:
cellSpacing (MSDN)
cellSpacing (Mozilla Developer Center)
cellSpacing (Safari Reference Library)
cellSpacing (W3C)
cellSpacing (Mozilla Developer Center)
cellSpacing (Safari Reference Library)
cellSpacing (W3C)
User Contributed Comments
As of HTML5, cellSpacing is labeled obsolete by the W3C Validator. But its CSS antagonist, border-spacing, is not supported by IE until IE8!