Tables are a way of presenting information in a format that consists of rows and columns similar to how a spreadsheet displays informaiton. Amost anything can be included in a table, from data to hyperlinks.
NOTE: Some web browsers cannot display tables, so if you use them be aware that they may not appear to others as they appear on your browser.
<TABLE BORDER=2>
<CAPTION>My First Table</CAPTION>
<TR>
<TH>FIRST CELL ROW 1 HEADER</TH>
<TH>SECOND CELL ROW 1 HEADER</TH>
</TR>
(This would create a header for each cell using the first row of the table)
<TR>
<TD>FIRST DATA CELL ROW 2</TD>
<TD>SECOND DATA CELL ROW 2</TD>
</TR>
(This would create the first row with two cells for your data)
<TR>
<TD>FIRST DATA CELL ROW 3</TD>
<TD>SECOND DATA CELL ROW 3</TD>
(This would create the second row with two cells for your data)
</TR>
</TABLE>
FIRST CELL ROW 1 HEADER | SECOND CELL ROW 1 HEADER |
---|---|
FIRST DATA CELL ROW 2 | SECOND DATA CELL ROW 2 |
FIRST DATA CELL ROW 3 | SECOND DATA CELL ROW 3 |
Study the above example and see if you can determine what each line of code accomplished. Then the following example will show you how some of the options can change the appearance of your table.
<CENTER>
<TABLE BORDER=10 CELLPADDING=4 CELLSPACING=10>
<CAPTION>My Second Table</CAPTION>
<TR>
<TH COLSPAN=3>Header Spanning Three Columns </FONT> </TH>
</TR>
(This would create a single header using the first row of the table)
<TR ALIGN=CENTER>
<TD>This would be the first cell in row 2 </TD>
<TD>This is the second cell in row 2</TD>
<TD>This is the third row in cell 2 notice how all three are centered within the cells.</TD>
</TR>
(This would create the first row with three cells with your data centered)
<TR>
<TD>First Cell in Row 3</TD>
<TD>Second Cell in Row 3 </TD>
<TD ROWSPAN=2 ALIGN=RIGHT>Third cell in row 3 spanning 2 rows, aligned to the right side of the column </TD>
(This would create the second row with cell three spanning 2 rows and aligned right)
</TR>
<TR align=center>
<TD colspan=2>One Cell in Row 4 spanning 2 columns .</TD>
</TR>
(This would create a third row spanning 2 columns with one cell centered)
</TABLE>
</CENTER>
Header Spanning Three Columns | ||
---|---|---|
This would be the first cell in row 2 | This is the second cell in row 2 | This is the third row in cell 2 notice how all three are centered within the cells. |
First Cell in Row 3 | Second Cell in Row 3 | Third cell in row 3 spanning 2 rows, aligned to the right side of the column |
One Cell in Row 4 spanning 2 columns. |
If you study the second example, you should start to see just how you can configure a table to suit your needs. Try each of the above and modify some options to see what kind of a table you can create. Just remember that the <table>...</table> tags must surround the entire table. The Caption and Table Header tags are optional, and each row should have a <TR>...</TR> surrounding them. You can then place the <TD>....</TD> around each cell within each row.
© 1996 l_curreri@yahoo.com
Visit My Home Page
last modified: January 14, 2002
This page hosted by Get your own Free Home Page