Share via


TABLE XHTML Element

Send Feedback

The TABLE element 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 for All DOM 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, events and methods.

Attributes

Attribute Value PPC SP Description
ALIGN   Yes Yes Indicates horizontal alignment of the table relative to the browser window.

This attribute is equivalent to the CSS:

float: {align}
Note   Supported only for devices running PocketPC 2002 and Smartphone 2002 software or later.
  left Yes Yes  
  center Yes Yes  
  right Yes Yes  
BACKGROUND URL Yes Yes Specifies the URL of a background image to be displayed beneath the table.

This attribute is equivalent to the CSS:

background-image: url( {url} );
Note   Supported only for devices running Windows Mobile 2003 software or later.
BGCOLOR Special Yes Yes 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:

background-color: {color}
BORDER 0...# Yes Yes 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:

list-style-type: lower-roman;
BORDERCOLOR Special Yes Yes 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:

border-color: {color}
CELLPADDING 0...# Yes Yes Specifies the amount of space in pixels between the cell border and the cell content. (Percentage values are not supported.)
CELLSPACING 0...# Yes Yes Specifies the amount of space in pixels between table cells. (Percentage values are not supported.)
CLASS   Yes Yes Associates the element with a CSS style.
Note   Supported only for devices running Windows Mobile 2003 software or later.
FRAME   Yes Yes Specifies the way the border frame around the table is displayed.
  void Yes Yes Specifies how the border frame is displayed around the table. If the value is void, all outside table borders are removed.
  above Yes Yes Top of the border frame is displayed.

This attribute is equivalent to the CSS:

border-top: {n} px solid;
  below Yes Yes Bottom of the border frame is displayed.

This attribute is equivalent to the CSS:

border-bottom: {n} px solid;
  hsides Yes Yes Top and bottom borders of the table frame are displayed

This attribute is equivalent to the CSS:

border-top: {n} px solid; border-bottom: {n} px solid;
  vsides Yes Yes Left and right borders of the table frame are displayed.

This attribute is equivalent to the CSS:

border-left: {n} px solid; border-right: {n} px solid;
  lhs Yes Yes Left border of the table frame is displayed.

This attribute is equivalent to the CSS:

border-left: {n} px solid;
  rhs Yes Yes Right border of the table frame is displayed.

This attribute is equivalent to the CSS:

border-right: {n} px solid;
  box Yes Yes Borders on all sides of the table frame are displayed.

This attribute is equivalent to the CSS:

border-top: {n} px solid; border-bottom: {n} px solid; border-left: {n} px solid; border-right: {n} px solid;
  border Yes Yes Borders on all sides of the table frame are displayed.

This attribute is equivalent to the CSS:

border-top: {n} px solid; border-bottom: {n} px solid; border-left: {n} px solid; border-right: {n} px solid;
HEIGHT   Yes Yes 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:

height: {n}
Note   Supported only for devices running Windows Mobile 2003 software or later.
ID   Yes Yes Uniquely identifies the element within a document.
Note   Supported only for devices running Windows Mobile 2003 software or later.
RULES   Yes Yes (See comments for TABLE FRAME attribute)

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

  none Yes Yes All interior table borders are removed.
  groups Yes Yes Specifies how groups of borders are displayed.
Note   Supported only for devices running Windows Mobile 2003 software or later.
  rules Yes Yes Specifies how rules (inner borders) are displayed.
  rows Yes Yes Horizontal borders between all table rows.
  cols Yes Yes Borders displayed between all table columns.
  All Yes Yes Borders displayed on all rows and columns.
STYLE   Yes Yes 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 Yes Yes Specifies the table width in pixels or as a percentage of the parent object.

This attribute is equivalent to the CSS:

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

Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later

See Also

XHTML Elements

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.