| Tag |
Tag attribute |
Function |
<table>..</table> |
|
Defines the beginning and end of a table. |
| |
border="..." |
sets the border width. |
| |
cellspacing="..." |
space between the table data cells. |
| |
cellpadding="..." |
space between the inner edge of a cell and
its content. |
| |
align="..." |
aligns the entire table to the left, right
or center of page. |
| |
width="..." |
the width of the table, in pixels or percentage of page
width. |
| |
bgcolor="..." |
background color for all cells that do not have a
background color or image specified. |
| |
background="..." |
background image for all cells that do not have a
background color or image specified. |
| |
bordercolor="..." |
border color for the table. |
| |
bordercolorlight="..." |
border color light to create a 3d effect. (i.e. only) |
| |
bordercolordark="..." |
border color dark to create a 3d effect. (i.e. only) |
| |
valign="..." |
vertical alignment of the content, values are top
or bottom. |
<tr>..</tr> |
|
Defines the beginning and end of each table row.
A table must have at least one row. Strictly speaking, the </tr> tag is not neceassary,
because the presence of the next <tr> tag will signal to the browser to go to the
next table row, but it is good practice to use the </tr> tag. |
| |
align="..." |
horizontal alignment of the content of all cells within
this row. values are left, right and center. |
| |
valign="..." |
vertical alignment of all cells within this row. values are
top, middle, bottom, and baseline. |
| |
bgcolor="..." |
background color of all cells within this row that don't
have their own bg color or background image. |
| |
background="..." |
background image of all cells within this row that don't
have their own bgcolor or background image. |
| |
bordercolor="..." |
border color for this row (i.e. only). |
| |
bordercolorlight="..." |
light border color for 3d look (i.e. only). |
| |
bordercolordark="..." |
dark border color for 3d look (i.e. only). |
<td>..</td> |
|
Defines the beginning and end of each table
data cell. The <td></td>
and <th></th> tags are enclosed
or nested within the <tr></tr> tags. |
| |
align="..." |
horizontal alignment of the cell content. values are left,
right and center. |
| |
valign="..." |
vertical alignment of the cell content. values are top,
middle, bottom, and baseline. |
| |
rowspan="..." |
the number of rows the cell will span. |
| |
colspan="..." |
the number of columns the cell will span. |
| |
nowrap |
doesn't automatically wrap the cell content. |
| |
width="..." |
the width of this cell, expressed in pixels
or percentage. |
| |
bgcolor="..." |
background color of the cell. |
| |
background="..." |
background image of the cell. |
| |
bordercolor="..." |
border color of the cell (i.e. only). |
| |
bordercolorlight="..." |
light border color for 3d look. (i.e. only) |
| |
bordercolordark="..." |
dark border color for 3d look. (i.e. only) |
<th>..</th> |
|
A special tag for cells that will act as table
headers (or column headings): Information within these cells
will be centered and in bold font. All of the attribute tags available with the <td></td>
tags are available for use with the <th></th> tags.
Although intended as table headings, these tags can be used
wherever you would use the <td></td> tags when you want text centered and in
bold font. |
| <caption>..</caption> |
|
Table captions can be added at the top or the bottom of the
table by using the CAPTION tag. The <caption> tag is placed after
the <TABLE> tag and before the first ROW tag. |
| |
align="BOTTOM" |
Default caption alignment is top of the table to position
the caption at the bottom use the align attribute. |