English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML 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>Credits</th> </tr> <tr> <td>Zhang San</td> <td>90</td> </tr> <tr> <td>Li Si</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 cells in pixels. If this attribute is not set, its default value is cellspacing="2".
Note:Do not confuse this attribute with cellpadding Attributes may be confused, the cellpadding attribute specifies the space between the cell border and the cell content.
<table cellspacing="pixels">
Value | Description |
---|---|
pixels | Specify the space between cells. |