English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The table cellspacing attribute specifies the spacing between cells (in pixels).
Set the spacing between table cells to 8 Pixel:
<table cellspacing="8" border="1"> <tr> <th>Name</th>/th> <th>Credits</th>/th> </tr> <tr> <td>Zhang San</td>/td> <td>90</td>/td> </tr> <tr> <td>Li Si</td>/td> <td>87</td> </tr> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the cellspacing attribute.
HTML5 The <table> cellspacing attribute is not supported.
The cellspacing attribute specifies the space between units in pixels. If this attribute is not set, its default value is cellspacing="2".
Note:Do not confuse this attribute with cellpadding Attribute confusion, the cellpadding attribute specifies the space between the cell border and the cell content.
<table cellspacing="pixels">
Value | Description |
---|---|
pixels | Specify the space between units. |