CELLPADDING and CELLSPACING


Cells within HTML tables can also have borders around them. One can specify the thickness of the border between cells. For example:
<TABLE BORDER="1" CELLPADDING="number" CELLSPACING="number">
The CELLPADDING attribute separates text of the cell from the cell border with a padding with the specified number of pixels.

The CELLSPACING attribute creates a space, or border, of the specified number of pixels, between each cell.

The higher the number, the thicker the border.

Here are two table examples, the first one with CELLPADDING and the second one with CELLSPACING.


<TABLE BORDER="1" CELLPADDING="10" CELLSPACING="0">
<CAPTION>Example 1:  CELLPADDING</CAPTION>
<TR>
<TD>Apples</TD> <TD>Bananas</TD> <TD>Cherries</TD>
</TR;
<TR>
<TD>Nectarines</TD> <TD>Oranges</TD> <TD>Papaya</TD>
</TR>
</TABLE>
Example 1: CELLPADDING
Apples Bananas Cherries
Nectarines Oranges Papaya

<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="10">
<CAPTION>Example 2:  CELLSPACING</CAPTION>
<TR>
<TD>Apples</TD> <TD>Bananas</TD> <TD>Cherries</TD>
</TR>
<TR>
<TD>Nectarines</TD> <TD>Oranges</TD> <TD>Papaya</TD>
</TR>
</TABLE>
Example 2: CELLSPACING
Apples Bananas Cherries
Nectarines Oranges Papaya

I understand these table attributes. I want to know how to make the tables wider.
[INDEX] [PREVIOUS] [NEXT PAGE] [CHAPTER 8]

Valid HTML 3.2!