<table cellspacing="">

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

The cellspacing attribute of the TABLE element specifies the space between cells.


<table cellspacing="3"></table>

Attribute Value Explanation
cellspacing=" " pixels or % the size of the space

Example

The cellspacing is 0

<table border="1" cellspacing="0">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>

Output
Cell A Cell B Cell C
The cellspacing is 5

<table border="1" cellspacing="5">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>

Output
Cell A Cell B Cell C
The cellspacing is 15

<table border="1" cellspacing="15">
<tr>
<td>Cell A</td>
<td>Cell B</td>
<td>Cell C</td>
</tr>
</table>

Output
Cell A Cell B Cell C