Tables are the most widely used formatting element in HTML. They display both tabular and non-tabular information in a professional looking manner. To my knowledge, anything that can be put anywhere on a page can also be placed in a table element. This includes text, anchors, links, images etc.
This page is provided as a short tutorial in the use of Tables. It includes a listing of the available table tags and their options; a short set of "tips", "tricks", and "watch-outs" in using tables; and a set of examples of their use.
Tables are in actuality are relatively easy objects to visualize:
In tabular form, the HTML table tags are:
Table Tags | |
Tag | Description |
<TABLE> & </TABLE> | Defines the start and end of the TABLE. Its parameters are: |
<CAPTION> & </CAPTION> | Table Title. It spans the entire table, is borderless (regardless of the BORDER element above), and defaults to above the table. To locate the caption at the bottom use: ALIGN=BOTTOM. (ALIGN=TOP is acceptable but redundant.) |
<TR> & </TR> | ROW tag. Defines the start and end of each row. The same ALIGN and VALIGN parameters used in the cell tags can be used here. |
<TH> & </TH> | HEADER cell element tag. Defines the start and end of each header cell. (Same as a data cell tag except, the cell contents default to centered and bold (for text).) |
<TD> & </TD> | DATA cell element tag. Defines the start and end of each table data cell. The cell contents default to aligned left and vertically centered. Additional parameters for theHeader & data cells are: |
<TR>
<TH> Head 2</TH>
<TD> data 2</TD> |
Border=1 |
Border=0 |
Border=9 | ||||||||||||
|
|
| ||||||||||||
Border=1 CellPadding=9 |
Border=1 CellSpacing=9 |
Border=1 Width=90 pixels | ||||||||||||
|
|
| ||||||||||||
Width=80% | ||||||||||||||
| ||||||||||||||
Border=1 Caption-top |
Border=1 Caption-bottom |
Border=1 white | ||||||||||||
|
|
| ||||||||||||
Border=1 Color=white |
Border=1 Data Cell 1 color = white | |||||||||||||
|
| |||||||||||||
<TR>
<TD ALIGN="center">False</TD> <TD WIDTH=20% ALIGN="center"><A HREF="#Back0">
<A NAME="Back4"></A></TD>
<TD ALIGN="center">Trie</TD> |
|
Top of Page
|
|
<TD><FONT COLOR="black">Row - 1, Col - 3</FONT></TD> <TD><FONT COLOR="black">Row - 1, Col - 4</FONT></TD> <TD><FONT COLOR="black">Row - 1, Col - 5</FONT></TD>
<TD><FONT COLOR="black">Row -2, Col - 2</FONT></TD> <TD ROWSPAN="2" COLSPAN="2" VALIGN="center" BGCOLOR="wheat"><CENTER><FONT COLOR="black">
<TD><FONT COLOR="black">Row - 3, Col - 5</FONT></TD>
<TD><FONT COLOR="black">Row - 4, Col - 3</FONT></TD> <TD><FONT COLOR="black">Row - 4, Col - 4</FONT></TD>
|
Row - 1, Col - 1 | Row - 1, Col - 2 | Row - 1, Col - 3 | Row - 1, Col - 4 | Row - 1, Col - 5 |
Row - 2, Col - 1 | Row -2, Col - 2 | Cols - 3 & 4 |
Row - 2, Col - 5 | |
Rows - 3 & 4 Col - 1 |
Row - 3, Col - 2 | Row - 3, Col - 5 | ||
Row - 4, Col - 2 | Row - 4, Col - 3 | Row - 4, Col - 4 | ||
Row - 5, Cols - 1 through 5 |
<TD BGCOLOR="white" VALIGN="bottom">
|
|
|
|