|
HTML TABLE TAGS EXPLAINED, BY VICTOR M. PONCE |
| Tag |
Attribute |
Function |
Values |
Default |
Example |
Comments |
| TABLE |
ALIGN |
To align table relative to the page. |
LEFT | CENTER |
<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. |
LEFT | CENTER |
<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>
|