Chapter 9: Tables
index | previous | next

Adding Space around a Table

If your table is surrounded by other elements on your page, you may wish to pad it with a little extra space to help it stand out from the rest of the page.

To add space around a table:

  1. Type <TABLE.
  2. If desired, type HSPACE=h where h is the number of pixels of space to add on both the right and left sides of the table.
  3. If desired, type VSPACE=v where v is the number of pixels of space to add on both the top and bottom of the table.
  4. Type >.
  5. Create the table’s contents.
  6. Type </TABLE>.

Tips

  • You don’t have to add both HSPACE and VSPACE at the same time.
  • Neither HSPACE nor VSPACE is a standard attribute for the TABLE tag. Explorer doesn’t support them here (Figure 9.17) but Netscape does (Figure 9.18).
  • One alternative to HSPACE and VSPACE that both browsers do support is pixel shims. For more details, consult Using Pixel Shims on page 109.
Figure 9.16 You can use either the HSPACE attribute, the VSPACE attribute, or both at once.
Figure 9.17 Explorer doesn’t recognize the HSPACE and VSPACE attributes when applied to tables. Notice that this illustration is identical to Figure 9.15.
Figure 9.18 Netscape adds the extra space around the table just as if it were an image.
previous | next