Full Page for Printing
<PRE>...</PRE>The idea for the <TABLE>. . .</TABLE> container tag pair flows straight from one of the original purposes of the Web -- presentation of scientific data in a manner organized to allow visual statistical analysis. A true table reminds the viewer of a spreadsheet: rows (lines) across the page and columns down the page. Entries in each column are flush left to each other.
<TABLE>. . .</TABLE>
<TABLE attributes>
<TABLE> as "Top-of-Page" Menu
Images in a <TABLE>
A Simple <PRE>...</PRE> Container Table: The earliest HTML table is structured using preformatted text. The Web site developer types the information exactly as it is to appear on the screen -- white-spacing as if it were to be word-processed rather than displayed on a browser. Then, the <PRE> tag is placed ahead of the data, and the slash </PRE> tag after the data. Notice the following example:
| <PRE> | |||
| This is the first column | second column | third column | |
| this is line 2 | second column-line2 | third column-line 2 | |
| this is line 3 | column 2-line 3 | column 3-line 3 | |
| </PRE> |
The above code displays as follows:
This is the first column second column third column this is line 2 second column-line2 third column-line 2 this is line 3 column 2-line 3 column 3-line 3The difficulty with <PRE> containers lies in the spacing of the table elements. They need to be typed in a fixed, non-proportional font -- such as Courier, Fox Print, or Letter Gothic, one of the "typewriter" fonts -- so that the developer can "see" the correct spacing and columns. Notice that the display reflects the "Fixed" font set by the user in the Options, Preferences, Font choices in the browser.
<PRE> allows for a WIDTH="__" attribute which defines and limits the width, in pixels, of the text display. This is inserted as <PRE WIDTH="__"> in the tag.
<PRE> as Text Format: While designers generally think of using <PRE> to create preformatted tables -- with data organized in rows and columns as above -- <PRE> could also be used to create ASCII text designs such as the following:
o o o o . . .
o
o ___
||_____ ==== /^^^\___ __o_o__ ____| |__
>(________|14| |_monon_|(_MCCSC_) |_______|
_/oo OOOOO oo`- oo oo`- oo oo`- oo oo
---------------------------------------------------------
Remember, however, that all preformatted text -- whether organized as a
table or "organized" as a design -- must be typed in a "fixed,"
non-proportional font, in order to be able to visualize the placement of
spaces and characters.
Back to...TOP
Back
to...Designing Web Pages
<TABLE> uses three main markup tags: <TD>...</TD> for table data; <TR> for the end of a table row; and <TH>...</TH> for internal table headings. <TR> is an empty tag, while the others are containers.
The following code for a simple 3x3 table...
<TABLE>
<TH>Column 1</TH>
<TH>Column 2</TH>
<TH>Column 3</TH><TR>
<TD>Row 1-Column 1</TD>
<TD>Row 1-Column 2</TD>
<TD>Row 1-Column 3</TD><TR>
<TD>Row 2-Column 1</TD>
<TD>Row 2-Column 2</TD>
<TD>Row 2-Column 3</TD><TR>
<TD>Row 3-Column 1</TD>
<TD>Row 3-Column 2</TD>
<TD>Row 3-Column 3</TD><TR>
</TABLE>
...produces the following display:
| Column 1 | Column 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 |
| Row 3-Column 1 | Row 3-Column 2 | Row 3-Column 3 |
Notice that the <TD>...</TD> pair creates each cell, or content box.
Back to...TOP
Back
to...Designing Web Pages
In this, and in the following attributes, increase the weight of the border (or these attributes) with progressively larger numbers.
rrggbb Hex Numbers for 16 Colors To achieve the desired color, replace "#rrggbb" in each attribute argument with "#" and the six (6) characters on the color.
This cell is colored "light grey" and aligned right:
<TD BGCOLOR="#C0C0C0" ALIGN="right">
-- "cee-zero, cee-zero, cee-zero."
Let's add some attributes to the table created above.
<TABLE BORDER="2" CELLPADDING="3">
<TH COLSPAN="4">Columns</TH><TR>
<TH ROWSPAN="5">Rows</TH><TR>
<TH>Column 1</TH>
<TH BGCOLOR="#00FFFF">Column 2</TH>
<TH>Column 3</TH><TR>
<TD>Row 1-Column 1</TD>
<TD>Row 1-Column 2</TD>
<TD>Row 1-Column 3</TD><TR>
<TD BGCOLOR="#0000FF">Row 2-Column 1</TD>
<TD>Row 2-Column 2</TD>
<TD>Row 2-Column 3</TD><TR>
<TD>Row 3-Column 1</TD>
<TD>Row 3-Column 2</TD>
<TD BGCOLOR="#FF00FF">Row 3-Column 3</TD><TR>
</TABLE>
Notice that more than one attribute can be added within the tags.
| Columns | ||
|---|---|---|
| Rows | ||
| Column 1 | Column 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 |
| Row 3-Column 1 | Row 3-Column 2 | Row 3-Column 3 |
Ups and Downs: Here's where this gets real exciting and real depressing!
Depressing: Some browsers, including text-only browsers, do not support the <TABLE> tag at all; some of the strangest and most unreadable displays can be created on the graphical Netscape 1.0 or the text browser Lynx with <TABLE> tags. Always make a text-only browser part of your Web page testing process.
Exciting: Any HTML element -- heading, text, images, links, and/or combination of these -- can be placed inside a <TD> cell.
Back to...TOP
Back
to...Designing Web Pages
Essentially, the designer creates a <TABLE> with enough cells to hold all the content anchors. For example, nine anchors could be organized into a 3x3 <TABLE> or into a 3x4 <TABLE> with empty cells which create white space in the design.
This is the HTML code for the above menu. For more information on the structure tags included in the example, see Text Formats for <STRONG> and Anchors and Links for<A HREF="__" > structures.
<TABLE cellspacing=2 cellpadding=3>
<TD><a href="in-srch1.html"><STRONG>Searching the Internet</STRONG></A>
</TD><TD><A HREF="edres-st.html#THREE"><STRONG>Libraries and Research</STRONG></A>
</TD><TR><TD><http://www.mccsc.edu/samples/i-concep.html"><STRONG>Designing Web Pages</STRONG></A>
</TD><TD><A HREF="mccscweb.html"><STRONG>Evolution of the Web Site</STRONG></A><TR><TD><A HREF="edres-st.html#TWO"><STRONG>The Web around Here</STRONG></A>
</TD><TD><A HREF="edres-st.html#SEVEN"><STRONG>Fun and Games</STRONG></A>
</TD><TR><TD><STRONG>Connecting School Subjects:</STRONG>
<TD><a href="http://www.pierian.com/"><strong>The Learning Oasis</strong></a><;BR>
<A HREF="http://www.digicity.com/edusub.htm"><B>The Education Station</B></A><BR>
<A HREF="edres-st.html#SIX"><STRONG>English and Language Arts</STRONG></A><br>
<A HREF="edres-st.html#FIVE"><STRONG>Math and Science</STRONG></A><br>
<A HREF="edres-st.html#FOUR"><STRONG>World Cultures and Language</STRONG></A></TD><TR>
</TABLE>
Back to...TOP
Back
to...Designing Web Pages
Ideas | mccscNet
|
Back to...TOP
Back
to...Designing Web Pages