HOME            MAIN            NEXT            PREV

HTML TABLE Summary


HOME            MAIN            NEXT

TABLE Element: Tables and Tabular Structures

Usage:                <TABLE>...</TABLE>
Can Contain:       CAPTION, COL, COLGROUP, TBODY, THEAD, TR
Can Be Inside:    BLOCKQUOTE, BODY, CENTER, DD, DIV, FORM, LI, TD, TH
Attributes:           ALIGN, BGCOLOR, BORDER, CELLPADDING, CELLSPACING, WIDTH, 
                           (HSPACE, VSPACE
: Netscape Navigator only) 
                          
(BACKGROUND, BORDERCOLOR, BORDERCOLORDARK, 
                           BORDERCOLORLIGHT, FRAME,
RULES: Internet Explorer only)
TABLE specifies a table or other tabular structure. A basic TABLE can only contain two elements: a single CAPTION, to define a table caption, and one or more TR elements, which define the table rows. The TR element, in turn, can contain TD (table data) and TH (table header) elements that contains the actual content of the table.
By default, tables are drawn without borders, with a predetermined spacing between items in the table, and a table width that depends on the table content and that is calculated by the table-generation program. Finally, tables are, by default, left-aligned on the page, and break all text flow. This means that text preceding a TABLE appears above the rendered table, and text following a TABLE appears below it.
TOP

Here is the text before the table.
<TABLE>
<CAPTION>
Example 1: TABLE with No ALIGN, No BORDER</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
</TR>
</TABLE>
Here is the text after the table.

Here is the text before the table.
TABLE with No ALIGN, No BORDER
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3
Here is the text after the table.


TOP

<P> Here is the text before the table. Here is the text before the table. Here is the text before the table.
Here is the text before the table. Here is the text before the table. Here is the text before the table.
<TABLE ALIGN="left" BGCOLOR="#FFFF00" BORDER="1">
<CAPTION>
Example 2: TABLE with ALIGN="left" BGCOLOR="#FFFF00" BORDER="1"</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>
Here is the text after the table. Here is the text after the table. Here is the text after the table.
Here is the text after the table. Here is the text after the table. Here is the text after the table.
<P> Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.

<BR CLEAR=
"all">

Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table.
TABLE with ALIGN="left" BGCOLOR="#FFFF00" BORDER="1"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table.

Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table.


TOP

<P> Here is the text before the table. Here is the text before the table. Here is the text before the table.
Here is the text before the table. Here is the text before the table. Here is the text before the table.
<TABLE ALIGN="right" BORDERCOLOR="red" CELLPADDING="20" BORDER="5">
<CAPTION>
Example 3: TABLE with ALIGN=&quot;right&quoi; BORDERCOLOR=&quot;red&quot;
CELLPADDING=&quot;20&quot; BORDER=&quot;5&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>
Here is the text after the table. Here is the text after the table. Here is the text after the table.
Here is the text after the table. Here is the text after the table. Here is the text after the table.
<P> Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
<BR CLEAR="all">

Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table.
TABLE with ALIGN="right" BORDERCOLOR="red" CELLPADDING="20" BORDER="5"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table.

Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table.


TOP

<P> Here is the text before the table. Here is the text before the table. Here is the text before the table.
Here is the text before the table. Here is the text before the table. Here is the text before the table.
<TABLE ALIGN="center" BORDERCOLORDARK="red" CELLSPACING="10" BORDER="5">
<CAPTION>
TABLE with ALIGN=&quot;center&quot; BORDERCOLORDARK=&quot;red&quot;
CELLSPACING=&quot;10&quot; BORDER=&quot;5&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

Here is the text after the table. Here is the text after the table. Here is the text after the table.
Here is the text after the table. Here is the text after the table. Here is the text after the table.
<P> Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
<BR CLEAR="all">

Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table.
TABLE with ALIGN="center" BORDERCOLORDARK="red" CELLSPACING="10" BORDER="5"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table.

Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table.


TOP

<P> Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV.
Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV.
<DIV ALIGN="center">
<P>
Here is the text before the table. Here is the text before the table. Here is the text before the table.
Here is the text before the table. Here is the text before the table. Here is the text before the table.
<TABLE BORDERCOLORDARK="red" CELLSPACING="10" BORDER="5">
<CAPTION>
DIV with ALIGN=&quot;center&quot; contains TABLE with&nbsp; BORDERCOLORDARK=&quot;red&quot;
CELLSPACING=&quot;10&quot; BORDER=&quot;5&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

Here is the text after the table. Here is the text after the table. Here is the text after the table.
Here is the text after the table. Here is the text after the table. Here is the text after the table.
<P> Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
Here is a new paragraph after the table. Here is a new paragraph after the table.
</DIV>
<BR CLEAR=
"all">

Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV. Here is the text before the DIV.

Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table.
DIV with ALIGN="center" contains TABLE with  BORDERCOLORDARK="red" CELLSPACING="10" BORDER="5"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table.

Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table.



TOP

Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table. Here is the text before the table.
TABLE with ALIGN="left" BORDERCOLORLIGHT="red" BORDER="5" HSPACE="60" VSPACE="40"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table. Here is the text after the table.

Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table. Here is a new paragraph after the table.


TOP

<TABLE BORDER="5" FRAME="void" WIDTH="100%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;void&quot; WIDTH=&quot;100%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="void" WIDTH="100%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="above" BORDER="5" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;above&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="above" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="0" FRAME="below" WIDTH="500">
<CAPTION>
TABLE with BORDER=&quot;0&quot; FRAME=&quot;below&quot; WIDTH=&quot;500&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="0" FRAME="below" WIDTH="500"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

 <TABLE FRAME="below" WIDTH="50%">
<CAPTION>
TABLE with NO BORDER FRAME=&quot;below&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with NO BORDER FRAME="below" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="box" WIDTH="50%">
<CAPTION>
TABLE with FRAME=&quot;box&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with FRAME="box" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="hsides" WIDTH="50%">
<CAPTION>
TABLE with FRAME=&quot;hsides&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with FRAME="hsides" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" FRAME="hsides" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;hsides&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="hsides" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="lhs" WIDTH="50%">
<CAPTION>
TABLE with FRAME=&quot;lhs&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with FRAME="lhs" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" FRAME="lhs" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;lhs&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="lhs" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="rhs" WIDTH="50%">
<CAPTION>
TABLE with FRAME=&quot;rhs&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with FRAME="rhs" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" FRAME="rhs" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;rhs&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="rhs" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE FRAME="vsides" WIDTH="50%">
<CAPTION>
TABLE with FRAME=&quot;vsides&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with FRAME="vsides" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" FRAME="vsides" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; FRAME=&quot;vsides&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" FRAME="vsides" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" RULES="none" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; RULES=&quot;none&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" RULES="none" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE RULES="all" WIDTH="50%">
<CAPTION>
TABLE with RULES=&quot;all&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with RULES="all" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE BORDER="5" RULES="cols" WIDTH="50%">
<CAPTION>
TABLE with BORDER=&quot;5&quot; RULES=&quot;cols&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with BORDER="5" RULES="cols" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2


TOP

<TABLE RULES="rows" WIDTH="50%">
<CAPTION>
TABLE with RULES=&quot;rows&quot; WIDTH=&quot;50%&quot;
</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Left 1</TD> <TD ALIGN="right">Right 1</TD> <TD ALIGN="center">Center 1</TD>
</TR>
<TR>
    <TD>
Left 2</TD> <TD ALIGN="right">Right 2</TD> <TD ALIGN="center">Center 2</TD>
</TR>
</TABLE>

TABLE with RULES="rows" WIDTH="50%"
Header 1 Header 2 Header 3
Left 1 Right 1 Center 1
Left 2 Right 2 Center 2
 
TOP

 

TABLE with long text in a cell
Header 1 Header 2 Header 3 Header 4 Header 5 Header 6 Header 7 Header 8 Header 9 Header 10 Header 11 Header 12 Header 13 Header 14 Header 15
Data 1 Data 2 This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. This is a long paragraph in a cell. Data 4 Data 5 Data 6 Data 7 Data 8 Data 9 Data 10 Data 11 Data 12 Data 13 Data 14 Data 15

HOME            MAIN            NEXT            PREV

CAPTION Element: Table Caption

Usage:                <CAPTION>...</CAPTION>
Can Contain:       characters, character highlighting, A, APPLET, BR, IMG,
                           BASEFONT, MAP, SCRIPT, INPUT, SELECT, TEXTAREA
Can Be Inside:    TABLE 
Attributes:           ALIGN

CAPTION specifies an optional table caption or title. A TABLE can have at most one CAPTION. A CAPTION can not contain block elements. 
TOP

<P> Here is the text before the table.
<TABLE BORDER=1>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
</TR>
</TABLE>

Here is the text after the table.

Here is the text before the table.
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3
Here is the text after the table.


TOP
TABLE with CAPTION ALIGN="top"
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3


TOP

<TABLE BORDER=1>
<CAPTION ALIGN=
"bottom">TABLE with CAPTION ALIGN=&quot;bottom&quot;</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
</TR>
</TABLE>

TABLE with CAPTION ALIGN="bottom"
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3


TOP

<TABLE BORDER=1>
<CAPTION ALIGN=
"right">TABLE with CAPTION ALIGN=&quot;right&quot;</CAPTION>
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
</TR>
</TABLE>

TABLE with CAPTION ALIGN="right"
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3


HOME            MAIN            NEXT            PREV

COL Element: Specify Properties of a Column

Usage:                <COL>
Can Contain:       empty                           
Can Be Inside:    COLGROUP, TABLE 
Attributes:           ALIGN, SPAN, (WIDTH not currently supported)

COL specifies default properties for a column or a group of columns. A table will generally have multiple COL elements to specify properties of different columns.
TOP

<TABLE BORDER=1 WIDTH="50%">
<CAPTION>
TABLE with multiple COLs</CAPTION>
<COL ALIGN=
"left">
<COL ALIGN=
"right">
<COL ALIGN=
"center">
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
</TR>
</TABLE>

TABLE with multiple COLs
Header 1 Header 2 Header 3
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3


TOP

<TABLE BORDER=1 WIDTH="100%">
<CAPTION>
TABLE with SPAN</CAPTION>
<COL ALIGN=
"left">
<COL SPAN=
"3" ALIGN="right">
<COL ALIGN=
"center">
<TR>
    <TH>
Header 1</TH> <TH>Header 2</TH> <TH>Header 3</TH> <TH>Header 4</TH> <TH>Header 5</TH>
</TR>
<TR>
    <TD>
Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD> <TD>Data Row 1 Col 3</TD>
    <TD>
Data Row 1 Col 4</TD> <TD>Data Row 1 Col 5</TD>
</TR>
<TR>
    <TD>
Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD> <TD>Data Row 2 Col 3</TD>
    <TD>
Data Row 2 Col 4</TD> <TD>Data Row 2 Col 5</TD>
</TR>
</TABLE>

TABLE with SPAN
Header 1 Header 2 Header 3 Header 4 Header 5
Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3 Data Row 1 Col 4 Data Row 1 Col 5
Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3 Data Row 2 Col 4 Data Row 2 Col 5


HOME            MAIN            NEXT            PREV

COLGROUP Element: Properties of a Collection of Columns

Usage:                <COLGROUP>...(</COLGROUP>)
Can Contain:       COL                          
Can Be Inside:    TABLE 
Attributes:           ALIGN, (VALIGN not widely supported)

COLGROUP groups columns together in situations where there is logical structure associated with the group.
TOP

<TABLE BORDER=1 WIDTH="100%">
<CAPTION>
TABLE with multiple COLGROUPs with ALIGNs</CAPTION>
<COLGROUP ALIGN=
"left">
<COL>
<COL ALIGN=
"right">
<COL>
</COLGROUP>
<COLGROUP ALIGN=
"center">
<COL SPAN=
"2">
</COLGROUP>
<TR>
    <TH>
&nbsp;</TH> <TH>Column Header 1</TH> <TH>Column Header 2</TH>
    <TH>
Column Header 3</TH> <TH>Column Header 4</TH>
</TR>
<TR>
    <TH>
Row Header 1</TH> <TD>Data Row 1 Col 1</TD> <TD>Data Row 1 Col 2</TD>
    <TD>
Data Row 1 Col 3</TD> <TD>Data Row 1 Col 4</TD>
</TR>
<TR>
    <TH>
Row Header 2</TH> <TD>Data Row 2 Col 1</TD> <TD>Data Row 2 Col 2</TD>
    <TD>
Data Row 2 Col 3</TD> <TD>Data Row 2 Col 4</TD>
</TR>
</TABLE>

TABLE with multiple COLGROUPs with ALIGNs
  Column Header 1 Column Header 2 Column Header 3 Column Header 4
Row Header 1 Data Row 1 Col 1 Data Row 1 Col 2 Data Row 1 Col 3 Data Row 1 Col 4
Row Header 2 Data Row 2 Col 1 Data Row 2 Col 2 Data Row 2 Col 3 Data Row 2 Col 4


HOME            MAIN            NEXT            PREV

THEAD Element: Table Header

Usage:                <THEAD>...(</THEAD>)
Can Contain:       TR                          
Can Be Inside:    TABLE 
Attributes:           none

THEAD defines the table header. A table header consists of table rows that make up the header of the table. THEAD may contain one or more rows of TH table header cells. THEAD must precede the TBODY, which in turn must precede the TFOOT.
TOP

<TABLE BORDER=1 WIDTH="100%">
<CAPTION>
TABLE with THEAD TBODY TFOOT</CAPTION>
<THEAD>
<TR>
   
<TH ROWSPAN="2">&nbsp;</TH> <TH ROWSPAN="2">Heading1</TH> <TH ROWSPAN="2">Heading2</TH>
   
<TH COLSPAN="2">Main Heading</TH>
</TR>
<TR>
   
<TH>SubHead1</TH> <TH>SubHead2</TH>
</TR>
</THEAD>
<TBODY>
<TR>
   
<TH>Title1</TH> <TD>Item 1</TD> <TD>Item 2</TD>
    <TD>
Item 3</TD> <TD>SubT-1</TD>
</TR>
<TR>
   
<TH>Title2</TH> <TD>Item 4</TD> <TD>Item 5</TD>
   
<TD>Item 6</TD> <TD>SubT-2</TD>
</TR>
</TBODY>
<TFOOT>
<TR>
   
<TH>MAIN-T</TH> <TD>MAIN-1</TD> <TD>MAINT-2</TD>
   
<TD>MAIN-3</TD> <TD>SubMAIN</TD>
</TR>
</TBODY>
</TABLE>

TABLE with THEAD TBODY TFOOT
  Heading1 Heading2 Main Heading
SubHead1 SubHead2
Title1 Item 1 Item 2 Item 3 SubT-1
Title2 Item 4 Item 5 Item 6 SubT-2
MAIN-T MAIN-1 MAINT-2 MAIN-3 SubMAIN


HOME            MAIN            NEXT            PREV

TBODY Element: Table Body

Usage:                <TBODY>...(</TBODY>)
Can Contain:       TR                          
Can Be Inside:    TABLE 
Attributes:           none

TBODY defines the table body. A table body consists of table rows that make up the body of the table. TBODY may contain one or more rows of TH, and TD cells. THEAD must precede the TBODY, which in turn must precede the TFOOT.
HOME            MAIN            NEXT            PREV

TFOOT Element: Table Footer

Usage:                <TFOOT>...(</TFOOT>)
Can Contain:       TR                          
Can Be Inside:    TABLE 
Attributes:           none

TFOOT defines the table footer. A table footer consists of table rows that make up the footer of the table. TFOOT may contain one or more rows of TH, and TD cells. THEAD must precede the TBODY, which in turn must precede the TFOOT.
HOME            MAIN            NEXT            PREV

TR Element: Table Row

Usage:                <TR>...(</TR>)
Can Contain:       TH, TD
Can Be Inside:    TABLE, TBODY, TFOOT, THEAD
Attributes:           ALIGN, BGCOLOR, VALIGN,
                          
(BACKGROUND, BORDERCOLOR, BORDERCOLORDARK
                           BORDERCOLORLIGHT
: Internet Explorer only)
TR denotes a row of a table.
TOP

<TABLE BORDER="5" CELLPADDING="10" CELLSPACING="5" WIDTH="100%">
<CAPTION>
TR</CAPTION>
<TR BGCOLOR=
"#FF00FF" ALIGN="left">
    <TH COLSPAN="
2">Head 1 Row 1</TH> <TH COLSPAN="2">Head 2 Row 1</TH>
</TR>
<TR BGCOLOR=
"#FF0000" ALIGN="right">
    <TH>
Head 1 Row2 Col 1</TH> <TH>Head 1 Row 2 Col 2</TH>
    <TH>
Head 2 Row2 Col 1</TH> <TH>Head 2 Row 2 Col 2</TH>
</TR>
<TR BORDERCOLOR=
"#00FF00" ALIGN="center">
    <TD>
Header 1 Data 1</TD> <TD>Header 1 Data 2</TD>
   
<TD>Header 2 Data 3</TD> <TD>Header 2 Data 4</TD>
</TR>
<TR BORDERCOLORDARK=
"#0000C0" VALIGN="top">
   
<TD>Header 1 Data 5</TD> <TD>Header 1 Data 6</TD>
   
<TD>Header 2 Data 7</TD> <TD>Header 2 Data 8</TD>
</TR>
<TR BORDERCOLORLIGHT=
"#00FF00" VALIGN="middle">
   
<TD>Header 1 Data 9</TD> <TD>Header 1 Data 10</TD>
   
<TD>Header 2 Data 11</TD> <TD>Header 2 Data 12</TD>
</TR>
<TR BORDERCOLORLIGHT=
"#FF0000" VALIGN="bottom">
   
<TD>Header 1 Data 13</TD> <TD>Header 1 Data 17</TD>
   
<TD>Header 2 Data 15</TD> <TD>Header 2 Data 16</TD>
</TR>
<TR BORDERCOLORLIGHT=
"#FF7F50" VALIGN="baseline">
   
<TD>Header 1 Data 17</TD> <TD>Header 1 Data 18</TD>
   
<TD>Header 2 Data 19</TD> <TD>Header 2 Data 20</TD>
</TR>
</TABLE>

TR
Head 1 Row 1 Head 2 Row 1
Head 1 Row2 Col 1 Head 1 Row 2 Col 2 Head 2 Row2 Col 1 Head 2 Row 2 Col 2
Header 1 Data 1 Header 1 Data 2 Header 2 Data 3 Header 2 Data 4
Header 1 Data 5 Header 1 Data 6 Header 2 Data 7 Header 2 Data 8
Header 1 Data 9 Header 1 Data 10 Header 2 Data 11 Header 2 Data 12
Header 1 Data 13 Header 1 Data 17 Header 2 Data 15 Header 2 Data 16
Header 1 Data 17 Header 1 Data 18 Header 2 Data 19 Header 2 Data 20


HOME            MAIN            PREV

TH and TD Elements: Table Header and Table Data Cells

Usage:                <TH>...(</TH>)
                          <TD>...(</TD>)
Can Contain:       characters, character highlighting, A, APPLET, BR, IMG,
                           BASEFONT, MAP, SCRIPT, [ISINDEX], INPUT, SELECT, TEXTAREA,
                           DIR, DL, MENU, OL, UL, P, HR, Hn,
                           ADDRESS, BLOCKQUOTE, CENTER, DIV, FORM, PRE, TABLE

Can Be Inside:    TR
Attributes:           ALIGN, COLSPAN, HEIGHT, NOWRAP, ROWSPAN, VALIGN, WIDTH,
                          (BACKGROUND, BORDERCOLOR, BORDERCOLORDARK
                           BORDERCOLORLIGHT
: Internet Explorer only)
TH and TD specifies the cells in a table. TH species a Table Header cell--a cell containing a table heading. TD species a Table Data cell--a cell containing a table data. 
TOP

<TABLE BORDER>
<CAPTION><B>
Third Example</B></CAPTION>
<TR>
    <TH ROWSPAN=
"2" BGCOLOR="#C0C0C0">Head 1</TH> <TH COLSPAN="2" BGCOLOR="#808080">Head 2 Row 1</TH>
</TR>
<TR>
    <TH BORDERCOLOR=
"#FF0000">Head 2 Row2 Col 1</TH> <TH BORDERCOLOR="#0000FF">Head 2 Row 2 Col 2</TH>
</TR>
<TR>
    <TD BORDERCOLORDARK=
"#00FF00">Header 1 Data 1</TD>
<TD>
Header 2 Data 2</TD> <TD>Header 2 Data 3</TD>
</TR>
<TR>
    <TD ALIGN=
"left" BORDERCOLORLIGHT="#0000FF">Header 1 Data 4</TD>
    <TD>
Header 2 Data 5</TD> <TD>Header 2 Data 6</TD>
</TR>
<TR>
    <TD ALIGN=
"right" HEIGHT="200">Header 1 Data 7</TD>
    <TD>
Header 2 Data 8</TD> <TD>Header 2 Data 9</TD>
</TR>
<TR>
    <TD ALIGN=
"center" WIDTH="300">Header 1 Data 10</TD>
    <TD>
Header 2 Data 11</TD> <TD>Header 2 Data 12</TD>
</TR>
</TABLE>

TH and TD
Head 1 Head 2 Row 1
Head 2 Row2 Col 1 Head 2 Row 2 Col 2
Header 1 Data 1 Header 2 Data 2 Header 2 Data 3
Header 1 Data 4 Header 2 Data 5 Header 2 Data 6
Header 1 Data 7 Header 2 Data 8 Header 2 Data 9
Header 1 Data 10 Header 2 Data 11 Header 2 Data 12


TOP

<TABLE BORDER>
<CAPTION>
Different number of columns on different TRs</CAPTION>
<TR BGCOLOR=
"#C0C0C0">
<TH ROWSPAN=
"2">Head 1</TH> <TD COLSPAN="2">Head 2 Row 1</TD>
</TR>
<TR BGCOLOR=
"#808080">
<TH>
Head 2 Row2 Col 1</TH> <TH>Head 2 Row 2 Col 2</TH>
</TR>
<TR>
<TD>
Header 1 Data 1</TD>
<TD>
Header 2 Data 2</TD> <TD>Header 2 Data 3</TD>
<TD>
Header 1 Data 4</TD>
<TD>
Header 2 Data 5</TD> <TD>Header 2 Data 6</TD>
</TR>
</TABLE>

Different number of columns on different TRs
Head 1 Head 2 Row 1
Head 2 Row2 Col 1 Head 2 Row 2 Col 2
Header 1 Data 1 Header 2 Data 2 Header 2 Data 3 Header 1 Data 4 Header 2 Data 5 Header 2 Data 6


TOP

<TABLE BORDER>
<CAPTION>
HREF programs</CAPTION>
<TR>
<TH BGCOLOR=
"#FFFF00"><A HREF="sounds/AppletSoundExample/train.au">train.au</A></TH>
<TH BGCOLOR=
"#FF00FF"><A HREF="sounds/queserasera.mid">queserasera.mid</A></TH>
<TH BGCOLOR=
"#FF0000"><A HREF="sounds/MozartNo40.rmi">MozartNo40.rmi</A></TH>
</TR>
</TABLE>

HREF programs
train.au queserasera.mid MozartNo40.mid


HOME            MAIN            PREV
Hosted by www.Geocities.ws

1