Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The TABLEelement specifies that contained content is organized into a table consisting of rows and columns. This is a block element and requires a closing tag.

Using this Element

There are some common properties and collections that apply to all the elements of the document object model, see Common Properties, Methods and Collections for the HTML Elements in Internet Explorer Mobile.

This element can be used within a web page with attributes.

This element can be used within scripts where it will have properties, eventsand methods.

Attributes

The following table shows items that Internet Explorer Mobile supports.

Attribute Value Description

ALIGN

 

Indicates horizontal alignment of the table relative to the browser window.

This attribute is equivalent to the CSS:

Copy Code
float: {align}
Note:
Supported only for devices running Pocket PC 2002 and Smartphone 2002 software or later.

 

left

 

 

center

 

 

right

 

BACKGROUND

URL

Specifies the URL of a background image to be displayed beneath the table.

This attribute is equivalent to the CSS:

Copy Code
background-image: url( {url} );
Note:
Supported only for devices running Windows Mobile 2003 software or later.

BGCOLOR

Special

Sets the table background color. Table background colors are disabled on grayscale devices, and backgrounds are always white. See BODY BGCOLOR for the format and possible color names.

This attribute is equivalent to the CSS:

Copy Code
background-color: {color}

BORDER

0…#

Sets the border width in pixels. Omitting this attribute or setting it to zero results in borders not being drawn on the table.

This attribute is equivalent to the CSS:

Copy Code
list-style-type: lower-roman;

BORDERCOLOR

Special

Sets the table border color. Table border colors are disabled on grayscale devices, and borders are always black. See BODY BGCOLOR for the format and possible color names.

This attribute is equivalent to the CSS:

Copy Code
border-color: {color}

CELLPADDING

0…#

Specifies the amount of space in pixels between the cell border and the cell content. (Percentage values are not supported.)

CELLSPACING

0…#

Specifies the amount of space in pixels between table cells. (Percentage values are not supported.)

CLASS

 

Associates the element with a CSS style.

Note:
Supported only for devices running Windows Mobile 2003 software or later.

FRAME

 

Specifies the way the border frame around the table is displayed.

 

void

Specifies how the border frame is displayed around the table. If the value is void, all outside table borders are removed.

 

above

Top of the border frame is displayed.

This attribute is equivalent to the CSS:

Copy Code
border-top: {n} px solid;

 

below

Bottom of the border frame is displayed.

This attribute is equivalent to the CSS:

Copy Code
border-bottom: {n} px solid;

 

hsides

Top and bottom borders of the table frame are displayed

This attribute is equivalent to the CSS:

Copy Code
border-top: {n} px solid; border-bottom: {n} px solid;

 

vsides

Left and right borders of the table frame are displayed.

This attribute is equivalent to the CSS:

Copy Code
border-left: {n} px solid; border-right: {n} px solid;

 

lhs

Left border of the table frame is displayed.

This attribute is equivalent to the CSS:

Copy Code
border-left: {n} px solid;

 

rhs

Right border of the table frame is displayed.

This attribute is equivalent to the CSS:

Copy Code
border-right: {n} px solid;

 

box

Borders on all sides of the table frame are displayed.

This attribute is equivalent to the CSS:

Copy Code
border-top: {n} px solid; border-bottom: {n} px solid; border-left:
{n} px solid; border-right: {n} px solid;

 

border

Borders on all sides of the table frame are displayed.

This attribute is equivalent to the CSS:

Copy Code
border-top: {n} px solid; border-bottom: {n} px solid; border-left:
{n} px solid; border-right: {n} px solid;

HEIGHT

 

Specifies the minimum height of the table when fit-to-screen is off. When fit-to-screen is on, it specifies the minimum height unless the table had a given width and was shrunk by Internet Explorer Mobile.

This attribute is equivalent to the CSS:

Copy Code
height: {n}
Note:
Supported only for devices running Windows Mobile 2003 software or later.

ID

 

Uniquely identifies the element within a document.

Note:
Supported only for devices running Windows Mobile 2003 software or later.

RULES

 

(See comments for TABLE FRAME attribute)

Rules: Specifies how rules (inner borders) are displayed.

 

none

All interior table borders are removed.

 

groups

Specifies how groups of borders are displayed.

Note:
Supported only for devices running Windows Mobile 2003 software or later.

 

rules

Specifies how rules (inner borders) are displayed.

 

rows

Horizontal borders between all table rows.

 

cols

Borders displayed between all table columns.

 

All

Borders displayed on all rows and columns.

STYLE

 

Provides the definition of the CSS styles used for this element.

Note:
Supported only for devices running Windows Mobile 2003 software or later.

WIDTH

Special

Specifies the table width in pixels or as a percentage of the parent object.

This attribute is equivalent to the CSS:

Copy Code
width: {n}

Scripting Properties

This element has no scripting properties.

Scripting Events

This element has no associated events.

Scripting Methods

This property has no associated methods.

Requirements

Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also