HTML TABLE TAGS EXPLAINED, BY VICTOR M. PONCE
Tag Attribute Function Values Default Example Comments
TABLE ALIGN To align table relative to the page. LEFTCENTER <TABLE ALIGN="LEFT"> ---
CENTER
RIGHT
WIDTH To specify width in pixels or percentage of page. Variable Function of font size <TABLE WIDTH="50%"> ---
HEIGHT To specify height in pixels or percentage of page. Variable Function of font size <TABLE HEIGHT="850">---
BACKGROUND To specify image to be used as page background. Variable None <TABLE BACKGROUND="image.jpg">Overrides BGCOLOR attribute.
BGCOLOR To specify background color, in valid HTML color spec. Variable #ffffff (white) <TABLE BGCOLOR="#ee6611">---
BORDER To specify thickness of border, in pixels. Variable 0 <TABLE BORDER="2">---
BORDERCOLOR To specify border color, in valid HTML color spec. Variable #444444 (gray) <TABLE BORDERCOLOR="#779922">Default is shaded.
CELLPADDING To specify white space padding within table cells, in pixels. Variable 1 <TABLE CELLPADDING="10">Use to space the table within cells.
CELLSPACING To specify white space padding between table cells, in pixels. Variable 2 <TABLE CELLSPACING="1">Use to space the table among cells.
TR BACKGROUND To specify image to be used as TR (table row) background. Variable None <TR BACKGROUND="imagetr.jpg"> Overrides TR BGCOLOR attribute.
BGCOLOR To specify TR (table row) background color, in valid HTML color spec. Variable #ffffff (white) <TR BGCOLOR="#ee6611">---
TD ALIGN To align table data relative to the TD (table data) cell. LEFTCENTER <TD ALIGN="LEFT"> ---
CENTER
RIGHT
WIDTH To specify width in pixels or percentage of TD cell. Variable Function of font size <TD WIDTH="50%"> ---
HEIGHT To specify height in pixels or percentage of TD cell. Variable Function of font size <TD HEIGHT="850">---
BACKGROUND To specify image to be used as TD background. Variable None <TD BACKGROUND="imagetd.jpg"> Overrides TD BGCOLOR attribute.
BGCOLOR To specify TD background color, in valid HTML color spec. Variable #ffffff (white) <TD BGCOLOR="#ee6611">---
ROWSPAN To make the cell span a number of rows. Variable 1 <TD ROWSPAN="11">---
COLSPAN To make the cell span a number of columns. Variable 1 <TD COLSPAN="7">---
Example:  <TABLE ALIGN="left" BORDER="2" BORDERCOLOR="#779922" CELLPADDING="10" CELLSPACING="1"><TR><TD ROWSPAN="5" BGCOLOR="#ffff00">Example of complete table specification.</TD></TR></TABLE>

<center>
<table width="80%"><tr><td>
<table width="100%" cellpadding="10" cellspacing="1" border="2" bordercolor="#779922">
<tr bgcolor="#ffff00">
<td background="backgroundmarble1.jpg" colspan="7" align="center" bgcolor="#ffff00"><font face="helvetica" color="#000055">
<b>HTML TABLE TAGS EXPLAINED, BY VICTOR M. PONCE</td>
</tr>
<tr bgcolor="#ffffcc">
<td><font face="helvetica" color="#000055"><b>Tag</td>
<td><font face="helvetica" color="#000055"><b>Attribute</td>
<td><font face="helvetica" color="#000055"><b>Function</td>
<td><font face="helvetica" color="#000055"><b>Values</td>
<td><font face="helvetica" color="#000055"><b>Default</td>
<td><font face="helvetica" color="#000055"><b>Example</td>
<td><font face="helvetica" color="#000055"><b>Comments</td>
</tr>
<tr bgcolor="#bbddaa">
<td bgcolor="#bbccaa" rowspan="11"><font face="helvetica" color="#000055"><b>TABLE</td>
<td rowspan="3"><font face="helvetica" color="#000055">ALIGN</td>
<td rowspan="3"><font face="helvetica" color="#000055">To align table relative to the page.</td>
<td><font face="helvetica" color="#000055">LEFT</td>
<td rowspan="3"><font face="helvetica" color="#000055">CENTER</td>
<td rowspan="3"><font face="helvetica" color="#000055"><TABLE ALIGN="LEFT"> </td>
<td rowspan="3"><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#bbddaa"><td><font face="helvetica" color="#000055">CENTER</td>
</tr>
<tr bgcolor="#bbddaa"><td><font face="helvetica" color="#000055">RIGHT</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">WIDTH</td>
<td><font face="helvetica" color="#000055">To specify width in pixels or percentage of page.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">Function of font size</td>
<td><font face="helvetica" color="#000055"><TABLE WIDTH="50%"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">HEIGHT</td>
<td><font face="helvetica" color="#000055">To specify height in pixels or percentage of page.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">Function of font size</td>
<td><font face="helvetica" color="#000055"><TABLE HEIGHT="850"></td><td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">BACKGROUND</td>
<td><font face="helvetica" color="#000055">To specify image to be used as page background.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">None</td>
<td><font face="helvetica" color="#000055"><TABLE BACKGROUND="image.jpg"></td>
<td><font face="helvetica" color="#000055">Overrides BGCOLOR attribute.</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">BGCOLOR</td>
<td><font face="helvetica" color="#000055">To specify background color, in valid HTML color spec.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">#ffffff (white)</td>
<td><font face="helvetica" color="#000055"><TABLE BGCOLOR="##ee6611"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">BORDER</td>
<td><font face="helvetica" color="#000055">To specify thickness of border, in pixels.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">0</td>
<td><font face="helvetica" color="#000055"><TABLE BORDER="2"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">BORDERCOLOR</td>
<td><font face="helvetica" color="#000055">To specify border color, in valid HTML color spec.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">#444444 (gray)</td>
<td><font face="helvetica" color="#000055"><TABLE BORDERCOLOR="##779922"></td>
<td><font face="helvetica" color="#000055">Default is shaded.</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">CELLPADDING</td>
<td><font face="helvetica" color="#000055">To specify white space padding within table cells, in pixels.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">1</td>
<td><font face="helvetica" color="#000055"><TABLE CELLPADDING="10"></td>
<td><font face="helvetica" color="#000055">Use to space the table within cells.</td>
</tr>
<tr bgcolor="#bbddaa">
<td><font face="helvetica" color="#000055">CELLSPACING</td>
<td><font face="helvetica" color="#000055">To specify white space padding between table cells, in pixels.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">2</td>
<td><font face="helvetica" color="#000055"><TABLE CELLSPACING="1"></td>
<td><font face="helvetica" color="#000055">Use to space the table among cells.</td>
</tr>
</table>
<tr bgcolor="#eeddaa">
<td bgcolor="#eeccaa" rowspan="2"><font face="helvetica" color="#000055"><b>TR</td>
<td><font face="helvetica" color="#000055">BACKGROUND</td>
<td><font face="helvetica" color="#000055">To specify image to be used as TR (table row) background.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">None</td>
<td><font face="helvetica" color="#000055"><TR BACKGROUND="imagetr.jpg"></td>
<td><font face="helvetica" color="#000055">Overrides TR BGCOLOR attribute.</td>
</tr>
<tr bgcolor="#eeddaa">
<td><font face="helvetica" color="#000055">BGCOLOR</td>
<td><font face="helvetica" color="#000055">To specify TR (table row) background color, in valid HTML color spec.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">#ffffff (white)</td>
<td><font face="helvetica" color="#000055"><TR BGCOLOR="#ee6611"></td><td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff">
<td bgcolor="#aaddff" rowspan="9"><font face="helvetica" color="#000055"><b>TD</td>
<td rowspan="3"><font face="helvetica" color="#000055">ALIGN</td>
<td rowspan="3"><font face="helvetica" color="#000055">To align table data relative to the TD (table data) cell.</td>
<td><font face="helvetica" color="#000055">LEFT</td><td rowspan="3"><font face="helvetica" color="#000055">CENTER</td>
<td rowspan="3"><font face="helvetica" color="#000055"><TD ALIGN="LEFT"> </td>
<td rowspan="3"><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff"><td><font face="helvetica" color="#000055">CENTER</td>
</tr>
<tr bgcolor="#aaeeff"><td><font face="helvetica" color="#000055">RIGHT</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">WIDTH</td>
<td><font face="helvetica" color="#000055">To specify width in pixels or percentage of TD cell.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">Function of font size</td>
<td><font face="helvetica" color="#000055"><TD WIDTH="50%"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">HEIGHT</td>
<td><font face="helvetica" color="#000055">To specify height in pixels or percentage of TD cell.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">Function of font size</td>
<td><font face="helvetica" color="#000055"><TD HEIGHT="850"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">BACKGROUND</td>
<td><font face="helvetica" color="#000055">To specify image to be used as TD background.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">None</td>
<td><font face="helvetica" color="#000055"><TD BACKGROUND="imagetd.jpg"></td>
<td><font face="helvetica" color="#000055">Overrides TD BGCOLOR attribute.</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">BGCOLOR</td>
<td><font face="helvetica" color="#000055">To specify TD background color, in valid HTML color spec.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">#ffffff (white)</td>
<td><font face="helvetica" color="#000055"><TD BGCOLOR="#ee6611"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">ROWSPAN</td>
<td><font face="helvetica" color="#000055">To make the cell span a number of rows.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">1</td>
<td><font face="helvetica" color="#000055"><TD ROWSPAN="11"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr bgcolor="#aaeeff">
<td><font face="helvetica" color="#000055">COLSPAN</td>
<td><font face="helvetica" color="#000055">To make the cell span a number of columns.</td>
<td><font face="helvetica" color="#000055">Variable</td>
<td><font face="helvetica" color="#000055">1</td>
<td><font face="helvetica" color="#000055"><TD COLSPAN="7"></td>
<td><font face="helvetica" color="#000055">---</td>
</tr>
<tr>
<td bgcolor="#ffff00" colspan="7"><font face="helvetica"><B>Example:</B></font>  
<font face="courier"><TABLE ALIGN="left" BORDER="2" BORDERCOLOR="#779922" CELLPADDING="10" CELLSPACING="1">
<TR><TD ROWSPAN="5" BGCOLOR="#ffff00">Example of complete table specification.</TD></TR></TABLE>
</td></tr></table>
</td></tr></table>
</center>
100524