TABLETABLE*
*



Contents  *



Index  *Topic Contents
*Previous Topic: SUP
*Next Topic: TBODY

TABLE

Description

Used to specify that the contained content is organized into a table with rows and columns. Use the TR, TD, and TH elements in the container to create the rows, columns, and cells.

The optional CAPTION, THEAD, TBODY, TFOOT, COLGROUP, and COL elements can be used to organize a table and apply attributes across columns and groups of columns.

Syntax

<TABLE
ALIGN=CENTER | LEFT | RIGHT
BACKGROUND=url
BGCOLOR=color
BORDER=n
BORDERCOLOR=color
BORDERCOLORDARK=color
BORDERCOLORLIGHT=color
CELLPADDING=n
CELLSPACING=n
CLASS=classname
COLS=n
DATAPAGESIZE=n
DATASRC=#ID
FRAME=ABOVE | BELOW | BORDER | BOX | INSIDES | LHS | RHS | VOID | VSIDES
HEIGHT=n
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
RULES=ALL | COLS | GROUPS | NONE | ROWS
STYLE=css1-properties
TITLE=text
WIDTH=n
event = script
>

ParameterDescription
ALIGN=CENTER | LEFT | RIGHT Specifies how the table should be aligned.
BACKGROUND=url Specifies a background picture for the table. The picture is tiled behind the text and graphics in the table, table head, or table cell.
BGCOLOR=color Sets the background color behind the element. For a complete list of colors, look at the Internet Explorer color table.
BORDER=n Specifies the thickness of a border to be drawn around the element.
BORDERCOLOR=color Sets border color and must be used with the BORDER attribute, except for frames. For a complete list of colors, look at the Internet Explorer color table.
BORDERCOLORDARK=color Sets independent border color control over one of the two colors used to draw a 3-D border, opposite of BORDERCOLORLIGHT, and must be used with the BORDER attribute.
BORDERCOLORLIGHT=color Sets independent border color control over one of the two colors used to draw a 3-D border, opposite of BORDERCOLORDARK, and must be used with the BORDER attribute.
CELLPADDING=n Specifies the amount of space between the border of the cell and the contents of the cell.
CELLSPACING=n Specifies the amount of space between cells in a table.
CLASS=classname Specifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
COLS=n The number of columns in the table.
DATAPAGESIZE=n Sets the number of records displayed in a data bound repeated table.
DATASRC=#ID Indicates the ID of the data source object that supplies the data that is bound to this element.
FRAME= ABOVE | BELOW | BORDER | BOX | INSIDES | LHS | RHS | VOID | VSIDES Specifies which sides of a frame (outside borders) are displayed. The possible values are:
BORDER Displays a border on all sides of the table frame. This is the default.
VOID Removes all outside table borders.
ABOVE Displays a border on the top side of the table frame.
BELOW Displays a border on the bottom side of the table frame.
HSIDES Displays a border on the top and bottom sides of the table frame.
LHS Displays a border on the left-hand side of the table frame.
RHS Displays a border on the right-hand side of the table frame.
VSIDES Displays a border on the left and right sides of the table frame.
BOX Displays a border on all sides of the table frame.
HEIGHT=n Along with WIDTH, specifies the size at which the element is drawn. This attribute may be initially set in pixels or percentages.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANG=language Specifies which language to use in ISO standard language abbreviation form.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
RULES=ALL | COLS | GROUPS | NONE | ROWS Specifies which dividing lines are displayed (inside borders).
Specifies which dividing lines (inside borders) are displayed. The possible values are:
NONE Removes all interior table borders. This is the default.
GROUPS Displays horizontal borders between all table groups. Groups are specified by the THEAD, TBODY, TFOOT, and COLGROUP elements.
ROWS Displays horizontal borders between all table rows.
COLS Displays vertical borders between all table columns.
ALL Displays a border on all rows and columns.
STYLE=css1-properties Specifies an in-line style sheet for the tag.
TITLE=text Used to provide advisory information. The contents of the title attribute will be displayed in a ToolTip during the onmouseover event.
WIDTH=n Along with HEIGHT, sets the initial size of the element. This attribute may be initially set in pixels or percentages.
event Can be one or more of these events:
onafterupdate onbeforeupdate
onblur onclick
ondblclick ondragstart
onfocus onhelp
onkeydown onkeypress
onkeyup onmousedown
onmousemove onmouseout
onmouseover onmouseup
onresize onrowenter
onrowexit onscroll
onselectstart

Remarks

Valid tags within a table include:

This element is a block element.

Both the start and end tags are required.

Example

<TABLE BORDER=1 WIDTH=80%>
<THEAD>
<TR>
<TH>Heading 1</TH>
<TH>Heading 2</TH>
</TR>
<TBODY>
<TR>
<TD>Row 1, Column 1 text.</TD>
<TD>Row 1, Column 2 text.</TD>
</TR>
<TR>
<TD>Row 2, Column 1 text.</TD>
<TD>Row 2, Column 2 text.</TD>
</TR>
</TABLE>

Scripting Object

TABLE

See Also

TD, TR


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.