HTML.
7. Tables
7.1 Table Elements
This is a <CAPTION> Caption
This is a <TH> Table Heading
| This is <TD> Table Data
| This is <TD> Table Data that is long to expand the table horizontally.
| This is <TD> Table Data
|
The table above is coded as:
<TABLE BORDER=1>
<CAPTION>This is ...</CAPTION>
<TH>This is ...
<TR><TD>This is ...
<TR><TD>This is ...
<TR><TD>This is ...
</TABLE>
7.2 Caption Alignment
This is a <CAPTION> Caption
This is <TD> Table Data that is long to expand the table horizontally.
|
This is a <CAPTION ALIGN=bottom> Caption
This is <TD> Table Data that is long to expand the table horizontally.
|
7.3 Table Borders
<TABLE>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=0>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=1>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=2>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=4>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=8>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=16>
This | is | a | table blah blah blah blah blah blah blah blah
|
7.4 Table Width & Height
<TABLE BORDER=1>
This | is | a | table blah blah blah blah blah blah
|
<TABLE BORDER=1 WIDTH="50%">
This | is | a | table blah blah blah blah blah blah
|
<TABLE BORDER=1 WIDTH="90%">
This | is | a | table blah blah blah blah blah blah
|
<TABLE BORDER=1 WIDTH=200>
This | is | a | table blah blah blah blah blah blah
|
<TABLE BORDER=1 HEIGHT=200>
This | is | a | table blah blah blah blah blah blah
|
<TABLE BORDER=1 HEIGHT="25%">
This | is | a | table blah blah blah blah blah blah
|
7.5 Table Alignment
<TABLE BORDER=1>
This | is | a | table blah blah blah blah blah blah blah blah
|
This text follows the </TABLE> tag.
This text should not flow around the table because the table is neither left- or right-ALIGNed.
This text should not flow around the table because the table is neither left- or right-ALIGNed.
<TABLE BORDER=1 ALIGN=right>
This | is | a | table blah blah blah blah blah blah blah blah
|
This text follows the </TABLE> tag.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
This text should flow around the right-aligned table.
<TABLE BORDER=1 ALIGN=left>
This | is | a | table blah blah blah blah blah blah blah blah
|
This text follows the </TABLE> tag.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
This text should flow around the left-aligned table.
7.6 Horizontal Cell Alignment
This is a <TH> Table Heading
| This is a <TH ALIGN=left> Table Heading
|
---|
This is a <TH ALIGN=right> Table Heading
|
---|
This is <TD> Table Data that is long to expand the table horizontally.
| This is <TD> Table Data
| This is <TD ALIGN=right> Table Data
| This is <TD ALIGN=center> Table Data
|
7.7 Vertical Cell Alignment
Some text.
Some text.
| <TD VALIGN=top>
| <TD VALIGN=baseline>
|
This is some text repeated a bunch of times.
This is some text repeated a bunch of times.
This is some text repeated a bunch of times.
This is some text repeated a bunch of times.
This is some text repeated a bunch of times.
| <TD VALIGN=middle>
| <TD VALIGN=bottom>
|
7.8 Cell Spacing & Padding
<TABLE BORDER=1>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=1 CELLSPACING=16>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=1 CELLPADDING=16>
This | is | a | table blah blah blah blah blah blah blah blah
|
<TABLE BORDER=1 CELLSPACING=16 CELLPADDING=16>
This | is | a | table blah blah blah blah blah blah blah blah
|
7.10 NOWRAP
Without NOWRAP
<TD> below
| <TD> below
|
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
| blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
With NOWRAP
<TD> below
| <TD NOWRAP> below
|
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
| blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
7.11 Row/Column Span
This is a <CAPTION> Caption
This is a <TH COLSPAN=3> Table Heading
|
This is <TD ROWSPAN=2> Table Data
| This is <TD> Table Data
| This is <TD> Table Data
|
This is <TD COLSPAN=2> Table Data
|
The table above is coded as:
<TABLE BORDER=1>
<CAPTION>This is ...</CAPTION>
<TH COLSPAN=3>This is ...
<TR>
<TD ROWSPAN=2>This is ...
<TD>This is ...
<TD>This is ...
<TR>
<TD COLSPAN=2>This is ...
</TABLE>
|