The
Web Designer can also use the attribute of BGCOLOR=
in a Table to change the
background color.
<TABLE
BORDER=2 BGCOLOR="#CC9966">
<TR>
<TD>This
is the first Row and first Data Cell
of this Table</TD>
<TD>This is the
first Row and second Data Cell of
this Table</TD>
</TR>
<TR>
<TD>This is the second Row and
third Data Cell of this Table</TD>
<TD>This
is the second Row and fourth Data Cell
of this Table</TD>
</TR>
</TABLE>
This is the
first Row and first Data Cell of
this Table |
This is the first
Row and second Data Cell of this
Table |
This is the second
Row and third Data Cell of this
Table |
This is the second
Row and fourth Data Cell
of this Table |
This can be especially
effective when using a BORDER=0
Example
<TABLE
BORDER=0 BGCOLOR="#CC9966">
<TR>
<TD>This
is the first Row and first Data Cell
of this Table</TD>
<TD>This is the
first Row and second Data Cell of
this Table</TD>
</TR>
<TR>
<TD>This
is the second Row and third Data Cell
of this Table</TD>
<TD>This
is the second Row and fourth Data Cell
of this Table</TD>
</TR>
</TABLE>
This is the
first Row and first Data Cell of this Table |
This is the first
Row and second Data Cell of this Table |
This is the second
Row and third Data Cell of this Table |
This is the second
Row and fourth Data Cell of this Table |
Sometimes, however, you can see the breaks where the Table Data Cells <TD>
were. To
avoid this the Web Designer just adds the attribute of CELLSPACING=0
to the Table tag.
Example
<TABLE
BORDER= BGCOLOR="#CC9966" CELLSPACING=0>
<TR>
<TD>This
is the first Row and first Data Cell
of this Table</TD>
<TD>This is the
first Row and second Data Cell of
this Table</TD>
</TR>
<TR>
<TD>This
is the second Row and third Data Cell
of this Table</TD>
<TD>This
is the second Row and fourth Data Cell
of this Table</TD>
</TR>
</TABLE>
This is the
first Row and first Data Cell of this Table |
This is the first
Row and second Data Cell of this Table |
This is the second
Row and third Data Cell of this Table |
This is the second
Row and fourth Data Cell of this Table |
The attribute of BGCOLOR= can also be placed in either
the Table Row <TR>
or a Table Data Cell <TD>
Example
<TABLE
BORDER=2>
<TR BGCOLOR="#CC9966">
<TD>This is the first Row
and first Data Cell of
this Table</TD>
<TD>This is the first Row
and second Data Cell of this Table</TD>
</TR>
<TR BGCOLOR="CC66CC">
<TD>This
is the second Row and
third Data Cell of this
Table</TD>
<TD>This
is the second Row and
fourth Data Cell of this
Table</TD>
</TR>
</TABLE>
This
is the first Row and first Data Cell of
this Table |
This
is the first Row and second Data Cell
of this Table |
This
is the second Row and third Data Cell
of this Table |
This
is the second Row and fourth Data Cell
of this Table |
Example
<TABLE
BORDER=2>
<TR>
<TD BGCOLOR="#CC9966">This
is the first Row and first
Data Cell of this Table</TD>
<TD BGCOLOR="#CC99CC">This
is the first Row and second
Data Cell of this Table</TD>
</TR>
<TR>
<TD BGCOLOR="#CC9966">This is the second
Row and third Data
Cell of this Table</TD>
<TD BGCOLOR="#CC99CC">This
is the second Row and fourth Data Cell
of this Table</TD>
</TR>
</TABLE>
This
is the first Row and first Data Cell of this Table |
This
is the first Row and second Data Cell of this Table |
This
is the second Row and third Data Cell of this Table |
This
is the second Row and fourth Data Cell of this Table |
All
the HTML Tags that you've learned can be placed inside a Table Data Cell.
You can place links, images, lists, and use bold, center, and italics.
In addition Tables can be nested. In other words you can have a Table
within a Table Data Cell.
Example
<TABLE
BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC33" WIDTH=501>
<TR VALIGN=MIDDLE ALIGN=LEFT>
<TD WIDTH=167><FONT SIZE=4 COLOR="#333333">
Everyone always asks how they can place an image
in the center of the page with text on either side. Now do you begin
to get an idea of the power of a Table to the Web Designer?
</TD>
<TD WIDTH=167><BR></TD>
<TD WIDTH=167 VALIGN=TOP><FONT SIZE=4 COLOR="#FFFF00">
I usually have my students study hard. But sometimes
I have them make <I>strange</I>
things.
</TD>
</TR>
<TR VALIGN=MIDDLE ALIGN=LEFT>
<TD WIDTH=167><BR></TD>
<TD WIDTH=167><IMG SRC="pic1.jpg">
<BR><FONT COLOR="#666666"><B><CENTER>
It
will stand upright!
</CENTER></B></FONT>
</TD>
<TD WIDTH=167><FONT SIZE=4 COLOR="333333">
Making
a 1 meter high kangaroo, that has to stand upright, out of old newspapers
and tape <strong>isn't</strong>
as easy as it looks!
</TD>
</TR>
<TD VALIGN=MIDDLE ALIGN=LEFT>
<TD WIDTH=167><
<TABLE BORDER=5>
<TR><TD> FONT SIZE=4 COLOR="#333333"> If
you are interested in finding out more about Kangaroos you can check
out these sites:
<OL>
<LI>
<A HREF="http://www.kangaroocenter.com/" >
<FONT COLOR="#000000">
Kangaroo Conservation Center </A></FONT>
<LI> <A HREF="http://www.pbs.org/kratts/world/aust/kangaroo/">
<FONT COLOR="#000000">
Red Kangaroo</A></FONT>
<LI>< A HREF="http://www.savethekangaroo.com/">
<FONT COLOR="#FFFFFF">Save the Kangaroo
</A></FONT>
</OL>
</TD></TD></TABLE>
</TD>
<TD WIDTH=167><BR></TD>
<TD WIDTH=167><IMG SRC="pic2.jpg"> <FONT COLOR="333333">I
also make them fight for grades!<CENTER><B>
</B></CENTER></FONT>
</TD>
</TR>
</TABLE>
Everyone
always asks how they can place an image in the center of the page
with text on either side. Now do you begin to get an idea of the power
of a Table to the Web Designer? |
|
I
usually have my students study hard. But sometimes I have them make
strange things.
|
|
It will stand upright!
|
Making a 1 meter high kangaroo, that has to stand upright, out of
old newspapers and tape isn't as easy as it looks! |
|
|
I can also make them fight for grades!
|
|