HTML Tables: Syntax of the <TABLE> TAG


Description Tag Attributes
Insert a table in the HTML document. <TABLE> BORDER
BORDER="pixels"
CELLSPACING="n"
CELLPADDING="n"
WIDTH="pixels-width or % of screen"
HEIGHT="pixel-height or % of screen"
Insert a caption for the table. <CAPTION> ... </CAPTION> ALIGN="horizontal-position"
Inserts a table header cell. The text contained inside is usually displayed in bold and is centered inside the cell. <TH> ... </TH> ALIGN="horizontal-position"
VALIGN="vertical-position"
NOWRAP
COLSPAN="columns"
ROWSPAN="rows"
WIDTH="pixel-width or % of table"
HEIGHT="pixel-height or % of table"
Defines a table row. All of the <TD> and <TH> tags enclosed will appear in the same row of the table. <TR> ... </TR> ALIGN="horizontal-position"
VALIGN="vertical-position"
BGCOLOR="#rrggbb"
Insert a table data cell. <TD> ... </TD> ALIGN="horizontal-position"
VALIGN="vertical-position"
NOWRAP
COLSPAN="columns"
ROWSPAN="rows"
WIDTH="pixel-width or % of table"
HEIGHT="pixel-height or % of table"
BGCOLOR="#rrggbb"
End a table in the HTML document. </TABLE>