Including tables in HTML documents

Use these tags to add tables to your Web pages.

 

Define Table <TABLE></TABLE>

Table Border <TABLE BORDER></TABLE> (either on or off)

Table Border <TABLE BORDER=?></TABLE> (you can set the value)

Cell Spacing <TABLE CELLSPACING=?>

Cell Padding <TABLE CELLPADDING=?>

Desired Width <TABLE WIDTH=?> (in pixels)

Width Percent <TABLE WIDTH=%> (percentage of page)

 

Table Row <TR></TR>

Alignment <TR ALIGN=LEFT|RIGHT|CENTER

VALIGN=TOP|MIDDLE|BOTTOM>

 

Table Cell <TD></TD> (must appear within table rows)

Alignment <TD ALIGN=LEFT|RIGHT|CENTER

VALIGN=TOP|MIDDLE|BOTTOM>

No linebreaks <TD NOWRAP>

Columns to Span <TD COLSPAN=?>

Rows to Span <TD ROWSPAN=?>

N1.1 Desired Width <TD WIDTH=?> (in pixels)

N1.1 Width Percent <TD WIDTH="%"> (percentage of table)

N3.0b Cell Color <TD BGCOLOR="#$$$$$$">

 

Table Header <TH></TH> (same as data, except bold centered)

Alignment <TH ALIGN=LEFT|RIGHT|CENTER

VALIGN=TOP|MIDDLE|BOTTOM>

No Linebreaks <TH NOWRAP>

Columns to Span <TH COLSPAN=?>

Rows to Span <TH ROWSPAN=?>

N1.1 Desired Width <TH WIDTH=?> (in pixels)

N1.1 Width Percent <TH WIDTH="%"> (percentage of table)

N3.0b Cell Color <TH BGCOLOR="#$$$$$$">

 

Table Caption <CAPTION></CAPTION>

Alignment <CAPTION ALIGN=TOP|BOTTOM> (above/below table)

 

Related topics

Including forms in HTML documents

HTML tags

Using frames in HTML documents