TABLES! | Go back to the Main Menu  |
Remember TR is Table Row. TD is Table Data cell. (/TR and /TD are optional)
Table 1
Ed, Rick and Tom |
Table 2
Ed |
Table 3
![]() |
Table 4
Ed | Tom | Rick |
Larry | Curly | Mo |
Next are a couple of attributes called CELLPADDING and CELLSPACING.
Both are used up front in the TABLE tag.
CELLPADDING is the amount of space between the border of the cell and the contents. CELLSPACING is the amount of space between the cells.
Table 5
Ed | Tom | Rick |
Larry | Curly | Mo |
Table 5b
THE THREE STOOGES | ||
---|---|---|
Ed | Tom | Rick |
Larry | Curly | Mo |
Table 5c
THE THREE STOOGES | ||
---|---|---|
Ed | Tom | Rick |
Larry | Curly | Mo |
One more thing about these table background colours...
A TD bgcolor will override a TR bgcolor and a TR bgcolor will override a TABLE bgcolor.
Table 6
Ed | ||
Larry | Curly | Mo |
Click here to be magically transported to the top.
The code for this page is as follows:
<HTML>
<HEAD>
<TITLE>Exercise 9 in HTML</TITLE>
</HEAD>
<BODY BGCOLOR="#33FFFF">
<A NAME="upabit"></A>
<FONT SIZE=6 FACE="MS SANS SERIF"><B><CENTER>Tables</CENTER></B></FONT><BR>
<P>Remember
TR is Table Row.
TD is Table Data cell.
(/TR and /TD are optional)
<P><B>Table 1</B><P>
<TABLE BORDER=3 WIDTH=100%>
<TR>
<TD>Ed, Rick and Tom</TD>
</TR>
</TABLE>
<P><B>Table 2</B><P>
<TABLE BORDER=3 WIDTH=100% HEIGHT=75>
<TR>
<TD ALIGN=LEFT VALIGN=TOP>Ed
</TABLE>
<P><B>Table 3</B><P>
<TABLE BORDER=3 WIDTH=100 HEIGHT=75>
<TR>
<TD ALIGN=LEFT VALIGN=MIDDLE><IMG SRC="ed.gif" WIDTH=32 HEIGHT=32>
</TABLE>
<P><B>Table 4</B><P>
<TABLE BORDER=3 WIDTH=300 HEIGHT=75>
<TR>
<TD WIDTH=60%>Ed
<TD WDITH=20%>Tom
<TD WIDTH=20%>Rick
<TR>
<TD>Larry
<TD>Curly
<TD>Mo
</TABLE>
<P>
Next are a couple of attributes called CELLPADDING and CELLSPACING.<P>
Both are used up front in the TABLE tag.<P>
CELLPADDING is the amount of space between the border of the cell and the contents.
CELLSPACING is the amount of space between the cells.
<P><B>Table 5</B><P>
<TABLE BORDER=3 CELLSPACING=12 CELLPADDING=12>
<TR BGCOLOR="#FFCCFF">
<TD>Ed
<TD>Tom
<TD>Rick
<TR>
<TD BGCOLOR="#FF0000">Larry
<TD>Curly
<TD BGCOLOR="#3366FF">Mo
</TABLE>
<P><B>Table 5b</B><P>
<TABLE BORDER=3 CELLSPACING=12 BORDERCOLOR=red>
<TH COLSPAN=3>THE THREE STOOGES</TH>
<TR BGCOLOR="#FFCCFF">
<TD>Ed
<TD>Tom
<TD>Rick
<TR>
<TD BGCOLOR="#FF0000">Larry
<TD>Curly
<TD BGCOLOR="#3366FF">Mo
</TABLE>
<P><B>Table 5c</B><P>
<TABLE BORDER=0 CELLSPACING=12>
<TH COLSPAN=3>THE THREE STOOGES</TH>
<TR BGCOLOR="#FFCCFF">
<TD>Ed
<TD>Tom
<TD>Rick
<TR>
<TD BGCOLOR="#FF0000">Larry
<TD>Curly
<TD BGCOLOR="3366FF">Mo
</TABLE>
<P>One more thing about these table background colours...<P>
A TD bgcolor will override a TR bgcolor and a TR bgcolor will
override a TABLE bgcolor.
<P><B>Table 6</B><P>
<TABLE BORDER=3>
<TR>
<TD COLSPAN=3 ALIGN=CENTER>Ed
<TR>
<TD>Larry
<TD>Curly
<TD>Mo
</TABLE>
<P>Click <A HREF="exercise9.htm#upabit">here</A> to be magically transported to the top.
<P>
</BODY>
</HTML>
Go back to the Top | Go back to the Main Menu  |