HTML TABLES INDEX

Table Headers

The <TH> tag is used to Place headers in a table. Headers help to keep the data within a table clear and understandable.

Odd Numbers Even Numbers
1 2
3 4

By typing this:
<TABLE BORDER=1>
<TR>
    <TH>Odd Numbers</TH>
    <TH>Even Numbers</TH>
</TR>
<TR>
    <TD>1</TD>
    <TD>2</TD>
</TR>
<TR>
    <TD>3</TD> 
    <TD>4</TD>
</TR>

</TABLE>
Sometimes headers will need to be on two sides of a table to keep complex data clear.

Odd Numbers Even Numbers
The
First
Four
Numbers
1 2
3 4

<TABLE BORDER=1>
<TR>
    <TD></TD>
    <TH>Odd Numbers</TH>
    <TH>Even Numbers</TH>
</TR>
<TR>
    <TH ROWSPAN=2>
The<BR>First<BR>Four<BR>Numbers</TH>
    <TD>1</TD>
    <TD>2</TD>
</TR>
<TR>
    <TD>3</TD> 
    <TD>4</TD>
</TR>

</TABLE>

  1. The TH is the same as the TD tag except the contents are bold and centered.
Rowspan Captions