Home

1. Introduction

2. Basics review

3. WIDTH

4. VALIGN

5. BORDER

6. BGCOLOR

7. CELLSPACING

8. CELLPADDING

9. ALIGN

10. Table manners

11. Editors

12. Summary

13. Exercises



Classes home

HTML Info home

 

CELLSPACING

You tend not to adjust cellspacing a lot. Editors typically use a default cellspacing value of 2-3 pixels. Authors probably change this most often to

  1. put some space between elements in a table
  2. eliminate different-colored gaps between cells in tables whose background colors contrast with the page background color.

An example for (2) above should make (1) clear as well.

Examples:

  <table border="0" cellspacing="5">
------------------------ ------------------------
------------------------ ------------------------
   <table border="0" cellspacing="0">
------------------------ ------------------------
------------------------ ------------------------