|
HTML 3.0 Table Tutorial LeJeune@usats.com |
|

![]() |
CautionThis is Netscape Country |
![]() |
Many Netscape enhancements are employed in this tutorial. Be aware the enhancements may display differently on different browsers, not display at all on some browsers, and actually break some browsers. I have also made the background Netscape's default gray since table borders do not display well on white or colored backgrounds.
Speaking of the Netscape & HTML EXplorer, you might want to take a look at the capsule review, or the Table of Contents. If you're at all like me you will also be interested in the book's money back guarantee and offer.
On the other hand, highly creative people -- like most Mac users -- don't like tabular displays of data, preferring presentations with more pizzazz. What ever your bag, the addition of tables to the proposed HTML 3.0 standard creates display options previously unavailable for your Web documents.
Both Netscape and Mosaic have implemented table constructs in their latest beta versions. This tutorial will review table implementations for those browsers. Keep in mind, HTML 3.0 is a proposal, not a standard. Syntactic structure may change in the final standard. In addition, Netscape has added enhancements to the proposed standards -- not exactly page one news.
| Starting Tag | Ending Tag |
Tag Description |
|---|---|---|
| <TABLE> | </TABLE> | Containers for borderless table. |
| <TABLE BORDER> | </TABLE> | Tag pair for table with borders. |
| <TR> | </TR> | Establishes a row within a table. |
| <TD> | </TD> | Defines a cell within a table. |
| <TH> | </TH> | Centers a heading at a table's top or side. |
| <CAPTION> | </CAPTION> | Places a title at the top of the table. |
The title, "HTML Table Tags " is a part of the table, as is everything else contained within the <TABLE> ... </TABLE> tags. The data contents of each cell is included between the <TD> ... </TD> pair. Only textual data has been used in table shown above. As we will see shortly, graphics can be used to create special effects. The <TR> ... </TR> pair defines rows. The <TH> ... </TH> tag pair defines heading elements while the <CAPTION> ... </CAPTION> centers a top title.
Normal textual tags, such as <BR>, <P>, or the <B>..</B> pair may be used within the individual cells. Each table cell may be looked upon as its own HTML document opening up many areas for creative expression.
Go to Table of Contents or go to Top of Table Tutorial
| Row One - Column One |
<TABLE> <TD>Row One - Column One</TD> </TABLE>Typically, a table with a border is cosmetically more appealing. The table shown in Example 2, with a border, is shown below.
| Row One - Column One |
<TABLE BORDER> <TD>Row One - Column One</TD> </TABLE>
Go to Table of Contents or go to Top of Table Tutorial
| Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
| Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
The HTML producing the above table is:
<TABLE BORDER=10>
<CAPTION ALIGN=TOP><B>
A Not So "Plain Vanilla"<BR> 2 Row by 3 Column Table
</B></CAPTION>
<TR>
<TD>Row 1 Column 1</TD><TD>Row 1 Column 2</TD><TD>Row 1 Column 3</TD>
</TR>
<TR>
<TD>Row 2 Column 1</TD><TD>Row 2 Column 2</TD><TD>Row 2 Column 3</TD>
</TR>
</TABLE>
Go to Table of Contents or go to Top of Table Tutorial
| This is Emphasis | Heading 3 |
Unformatted text |
| Bold with three lines |
![]() |
This table demonstrates text formatting within cells. The center cell in the second row is a null cell produced with an empty entry. The cell at the lower right corner contains a GIF image. The following is the HTML used to produce this table.
<TABLE BORDER>
<TR>
<TD><EM>This is Emphasis</EM></TD>
<TD><H3>Heading 3</H3></TD>
<TD>Unformatted Text;</TD>
</TR>
<TR>
<TD><B>Bold<BR>with<BR>three lines</B></TD>
<TD></TD>
<TD><IMG SRC="home.gif"></TD>
</TR>
</TABLE>
| This is Emphasis | Heading 3 |
Unformatted text |
| Bold with three lines |
> |
The upper left corner is specified as:
<TD WIDTH=50%><EM>This is Emphasis</EM></TD>
The lower left corner is:
<TD ALIGN=CENTER><B>Bold<BR>with<BR>three lines
</B></TD>
The lower right corner is specified as:
<TD ALIGN=RIGHT VALIGN=BOTTOM><IMG SRC="
home.gif"></TD>
Go to Table of Contents or go to Top of Table Tutorial
| Row 1 Col 1 | ROWSPAN=3 Element 1,2 |
Row 1 Col 3 |
| Row 2 Col 1 | ROWSPAN=2 Element 2,3 |
|
| Row 3 Col 1 |
This table demonstrates the ROWSPAN parameter. It takes the form:
<TD ROWSPAN=integer>data-element</TD>
Where integer is the number of additional rows to span and data-element is text or an inline image.
<TABLE BORDER>
<TR>
<TD>Row 1 Col 1</TD>
<TD>ROWSPAN=3>ROWSPAN=3<BR>Element 1,2</TD>
<TD>Row 1 Col 3</TD>
</TR>
<TR>
<TD>Row 2 Col 1</TD>
<!-- There is no entry for Row 2 Col 2 -->
<TD ROWSPAN=2>ROWSPAN=2<BR>Element 2,3</TD>
</TR>
<TR>
<TD>Row 3 Col 1</TD>
<!-- There is no entry for Row 3 Col 2 -->
<!-- There is no entry for Row 3 Col 3 -->
</TR>
</TABLE>
Go to Table of Contents or go to Top of Table Tutorial
| Row 1 Col 1 | COLSPAN=2 Element 1,2 |
|
Urb's Home PageCOLSPAN=3 - Element 2,1 |
||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
<TABLE BORDER>
<TR>
<TD>Row 1 Col 1</TD>
<TD COLSPAN=2>COLSPAN=2<BR>Element 1,2</TD>
</TR>
<TR>
<TD COLSPAN=3><A HREF=http://www.charm.net/~lejeune>
<IMG ALIGN=CENTER SRC=home.gif>
Urb's Home Page</A><BR> COLSPAN=3 - Element 2,1</TD>
</TR>
</TABLE>
Go to Table of Contents or go to Top of Table Tutorial
<TH>title</TH>
| Monday | Tuesday | Wednesday |
|---|---|---|
| Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
<TABLE BORDER>
<CAPTION>This is the table's caption. <B>In bold</B></CAPTION>
<TR>
<TH>Monday</TH><TH>Tuesday</TH><TH>Wednesday</TH>
</TR>
<TR>
<TD>Row 1 Column 1</TD><TD>Row 1 Column 2</TD><TD>Row 1 Column 3</TD>
</TR>
<TR>
<TD>Row 2 Column 1</TD><TD>Row 2 Column 2</TD><TD>Row 2 Column 3</TD>
</TR>
</TABLE>
| Monday | Tuesday | Wednesday | |
|---|---|---|---|
| Week One | Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Week Two | Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
<TABLE BORDER>
<TR>
<TH></TH> <! This is a null cell>
<TH>Monday</TH><TH>Tuesday</TH><TH>Wednesday</TH>
</TR>
<TR>
<TH>Week One</TH>
<TD>Row 1 Column 1</TD><TD>Row 1 Column 2</TD><TD>Row 1 Column 3</TD>
</TR>
<TR>
<TH>Week Two</TH>
<TD>Row 2 Column 1</TD><TD>Row 2 Column 2</TD><TD>Row 2 Column 3</TD>
<TD>Row 2 Column 3</TD>
</TR>
</TABLE>
Go to Table of Contents
or go to Top of Table Tutorial
On Line References and Background Material
Thanks to Steve Febbraro,
stefeb@oasis.ot.com,
for supplying many of these references
over 500 links brought to you by America's Town Square.
If you're into HTML this is the best source on the Web.
Go to Table of Contents or go to Top of Table Tutorial

This tutorial is -- hopefully -- an ongoing work. If you have any ideas or corrections it's contents or suggestion for enhancements I'd really appreciate hearing from you. You can reach me at LeJeune@usATS.Net

![]() | up to date with our "free stuff", special offers, and other goodies. We will not supply your e-mail address to anyone else. |
![]() | Please sign our
self-updating guestbook How about some free stuff from ATS? |
Please send our
crotchety Webmaster some mail.


Copyright ©1995-98 America's Town Square
15 Hunter Drive
Tuckerton, NJ 08087
(609) 294-0320
[an error occurred while processing this directive]