Another way to control the look and feel of your
tables is with the <CELLPADDING>
and <CELLSPACING> commands. The
<CELLPADDING> command
determines how much space is in-between your
text/image/whatever in the cell and the cell border. The default here is 1. The
<CELLSPACING> command
determines the space between cells. Try the
<CELLPADDING> first.
<HTML>
<HEAD>
<TITLE>Tables Test Page</TITLE>
</HEAD>
<BODY>
<TABLE ALIGN=CENTER BORDER=3 CELLPADDING =40>
<TR>
<TD BGCOLOR="RED">Jack</TD>
<TD BGCOLOR="BLUE">John</TD>
</TR>
<TR>
<TD BGCOLOR="YELLOW">Jill</TD>
<TD BGCOLOR="CYAN">Jeff</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Now try using the <CELLSPACING>
command.
<HTML>
<HEAD>
<TITLE>Tables Test Page</TITLE>
</HEAD>
<BODY>
<TABLE ALIGN=CENTER BORDER=3 CELLSPACING=40>
<TR>
<TD BGCOLOR="RED">Jack</TD>
<TD BGCOLOR="BLUE">John</TD>
</TR>
<TR>
<TD BGCOLOR="YELLOW">Jill</TD>
<TD BGCOLOR="CYAN">Jeff</TD>
</TR>
</TABLE>
</BODY>
</HTML>
There you go! Now you can create great looking and useful tables! Whenever you need to
make a great looking, and real organized, page use tables. Simple, and powerful!
Have a comment or
question dealing with this tutorial? Write us!