In Action

HTML Table cellspacing tag

I have coded the example so you can see the what happens as we increase the cellspacing value.

This is a table border 1, cellspacing 0
row #1
row #2

This is a table border 1, cellspacing 1
row #1
row #2

This is a table border 1, cellspacing 5
row #1
row #2

This is a table border 1, cellspacing 10
row #1
row #2


Toycode

HTML Code

Just cut-n-paste to reuse.

    
<table border="1" cellspacing="0">
  <th>This is a table border 1, cellspacing 0 </th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>

<br>

<table border="1" cellspacing="1">
  <th>This is a table border 1, cellspacing 1 </th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>

<br>

<table border="1" cellspacing="5">
  <th>This is a table border 1, cellspacing 5 </th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>


<br>

<table border="1" cellspacing="10">
  <th>This is a table border 1, cellspacing 10 </th>
  <tr>
    <td>row #1 </td>
  </tr>
  <tr>
    <td>row #2 </td>
  </tr>
</table>