<TABLE>
The TABLE element is used to organize content into columns and
rows much like how a spreadsheet application arranges data. Contained
within the TABLE tags are table rows (TR) and table data (TD) which
define the colulmns and rows.
A closing tag is required for this element.
Attributes
Attribute |
Description |
ID |
Identifies this tag to reference in script (program code) |
CLASS |
Define the class used to render this element (defined by a style sheet) |
TITLE |
A title that is associated with the element (displayed as a tooltip in Internet Explorer) |
ALIGN |
[DEPRECATED] Specifies the position of the table in reference to the HTML document.
Acceptable values for this attribute are: "left", "right" and "center". |
SUMMARY |
Contains a summary of the contents of the entire table for user agents
that use braille or speech. |
WIDTH |
Specifies the total width of the table as a percentage of the available
width or as the number of pixels. |
BGCOLOR |
Baclground color for the table. This should be specified as an RGB triplet
in the format "#d0ffc0" |
BORDER |
Specifies the thickness of the border in pixels. Some user agents will
render the border in 3-d or with shading. If you specify the border thickness
as zero ("0") the border is invisible. This is the default behavior |
CELLPADDING |
Specifies the size (in pixels) of the margin for each table data (TD)
element. |
CELLSPACING |
Indicates the margin spacing (in pixels) between each of the individual
table data (TD) elements. |
STYLE |
Defines an inline style for the TABLE element. Valid properties for this
attribute are any valid cascading style sheet (CSS) properties. |
|
Example
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="10" BGCOLOR="#F0FFF0">
<TR>
<TD>Upper left</TD>
<TD>Upper right</TD>
</TR><TR>
<TD>Lower left</TD>
<TD>Lower right</TD>
</TR>
</TABLE>
Renders As:
Upper left |
Upper right |
Lower left |
Lower right |
Compatibility
HTML 4.01
|