2. Document Object Model (HTML) Level 1

Editors
Mike Champion, ArborText
Gavin Nicol, Inso EPS
Vidur Apparao, Netscape
Scott Isaacs, Microsoft (until January 1998)
Chris Wilson, Microsoft (after January 1998)

2.1. Introduction

This specification is part of the W3C Document Object Model , which defines a programming interface for manipulating HTML and XML documents. Objects and methods that are used for both HTML and XML documents are defined in the W3C DOM Level 1 Core specification, which forms the basis for the current document. This document extends the Level 1 Core specification to describe objects and methods specific to HTML documents. In general, the functionality needed to manipulate hierarchical document structures, elements, and attributes will be found in the core specification; functionality that depends on the specific elements defined in HTML will be found in this document.

The goals of the HTML-specific DOM specification are:

The key differences between the core DOM and the HTML application of DOM is that the HTML Document Object Model exposes a number of convenience methods and properties that are consistent with the existing models and are more appropriate to script writers. In many cases, these enhancements are not applicable to a general DOM because they rely on the presence of a predefined DTD. For DOM Level 1, the transitional and frameset DTDs for HTML 4.0 are assumed.

The W3C DOM Working Group attempts, wherever possible, to maintain compatibility with the DOM Level 0, which is defined as being the functionality exposed in Netscape Navigator 3.0 and Microsoft Internet Explorer 3.0.

More specifically, this document includes the following specializations for HTML:

The Level 1 document does not include mechanisms to access and modify style specified through CSS 1. Furthermore, it does not define an event model for HTML documents. This functionality will be specified in a future Level of this specification.

2.2. HTML Application of Core DOM

2.2.1. Naming Conventions

The HTML DOM follows a naming convention for properties, methods, events, collections, and data types. All names are defined as one or more English words concatenated together to form a single string. Properties and Methods

The property or method name starts with the initial keyword in lowercase, and each subsequent word starts with a capital letter. For example, a property that returns document meta information such as the date the file was created might be named "fileDateCreated". In the ECMAScript binding, properties are exposed as properties of a given object. In Java, properties are exposed with get and set methods. Non-HTML 4.0 interfaces and attributes

While most of the interfaces defined below can be mapped directly to elements defined in the HTML 4.0 Recommendation, some of them cannot. Similarly, not all attributes listed below have counterparts in the HTML 4.0 specification (and some do, but have been renamed to avoid conflicts with scripting languages). Interfaces and attribute definitions that have links to the HTML 4.0 specification are defined there; all others are added by this specification, either for convenience or backwards compatibility with DOM Level 0 implementations.

2.3. Miscellaneous Object Definitions

Interface HTMLCollection

An HTMLCollection is a list of nodes. An individual node may be accessed by either ordinal index or the node's name or id attributes. Note: Collections in the HTML DOM are assumed to live meaning that they are automatically updated when the underlying document is changed.

IDL Definition
interface HTMLCollection {
  readonly attribute  long                 length;
  Node                      item(in long index);
  Node                      namedItem(in wstring name);
};

Attributes
length

This attribute specifies the length or size of the list.

Methods
item

This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order).

Parameters
index

The index of the node to be fetched.

Return Values

The Node at the corresponding position upon success. A value of null is returned if the index is out of range.


This method raises no exceptions.
namedItem

This method retrieves a Node using a name.

Parameters
name

The name of the Node to be fetched.

Return Values

The Node with a name or id attribute whose value corresponds to the specified string. Upon failure (e.g., no Node with this name exists), returns null.


This method raises no exceptions.

2.4. Objects related to HTML documents

Interface HTMLDocument

An HTMLDocument is the root of the HTML hierarchy and holds the entire content. Beside providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document.

The following properties have been deprecated in favor of the corresponding ones for the BODY element:

IDL Definition
interface HTMLDocument : Document {
           attribute  wstring              title;
  readonly attribute  wstring              referrer;
  readonly attribute  wstring              fileSize;
  readonly attribute  wstring              fileCreatedDate;
  readonly attribute  wstring              fileModifiedDate;
  readonly attribute  wstring              fileUpdatedDate;
  readonly attribute  wstring              domain;
  readonly attribute  wstring              URL;
           attribute  HTMLElement          body;
  readonly attribute  HTMLCollection       images;
  readonly attribute  HTMLCollection       applets;
  readonly attribute  HTMLCollection       links;
  readonly attribute  HTMLCollection       forms;
  readonly attribute  HTMLCollection       anchors;
           attribute  wstring              cookie;
  void                      open();
  void                      close();
  void                      write(in wstring text);
  void                      writeln(in wstring text);
  Element                   getElementById(in wstring elementId);
  NodeList                  getElementsByName(in wstring elementName);
};

Attributes
title

The title of a document as specified by the TITLE element in the head of the document.

referrer

Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

fileSize

The size of the document, in bytes.

fileCreatedDate

A string representation of the date the document was created. The value is derived from the HTTP header data sent by the Web server. Servers generally obtain this date by examining the file's modification date. The date format is that specified by the HTTP protocol.

fileModifiedDate

A string representation of the date the document was last modified. See fileCreatedDate for format information.

fileUpdatedDate

A string representation of the date the document was last updated. See fileCreatedDate for format information.

domain

The domain name of the server that served the document, or a null string if the server cannot be identified by a domain name.

URL

The complete URI of the document.

body

The element that contains the content for the document. In documents with BODY contents, returns the BODY element, and in frameset documents, this returns the outermost FRAMESET element.

images

A collection of all the IMG elements in a document. The behavior is limited to IMG elements for backwards compatibility.

applets

A collection of all the OBJECT elements that include applets and APPLET (deprecated) elements in a document.

links

A collection of all AREA elements and anchor (A) elements in a document with a value for the href attribute.

forms

A collection of all the forms of a document.

anchors

A collection of all the anchor (A) elements in a document with a value for the name attribute.

cookie

The cookies associated with this document. If there are none, the value is an empty string. Otherwise, the value is a string: a semicolon-delimited list of "name, value" pairs for all the cookies associated with the page. For example, name=value;expires=date.

Methods
open

Note. This method and the ones following allow a user to add to or replace the structure model of a document using strings of unparsed HTML. The Working Group is currently considering alternate methods for providing similar functionality for both HTML and XML documents. The following methods may be deprecated at some point in the future in favor of a more general-purpose mechanism.

Open a document stream for writing. If a document exists in the target, this method clears it.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

close

Closes a document stream opened by open() and forces display.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

write

Write a string of text to a document stream opened by open(). The text is parsed into the document's structure model.

Parameters
text

The string to be parsed into some structure in the document structure model.


This method returns nothing.
This method raises no exceptions.

writeln

Write a string of text followed by a newline character to a document stream opened by open(). The text is parsed into the document's structure model.

Parameters
text

The string to be parsed into some structure in the document structure model.


This method returns nothing.
This method raises no exceptions.

getElementById

Returns the Element whose id is given by elementId. If no such element exists, returns void. Behavior is not defined if more than one element has this id.

Parameters
elementId

The unique id value for an element.

Return Values


This method raises no exceptions.
getElementsByName

Returns the (possibly empty) collection of elements whose name value is given by elementName.

Parameters
elementName

The name attribute value for an element.

Return Values


This method raises no exceptions.

2.5. HTML Elements

2.5.1. Property Attributes

HTML attributes are exposed as properties on the element object. The name of the exposed property always uses the naming conventions, and is independent of the case of the attribute in the source document. The data type of the property is determined by the type of the attribute as determined by the HTML 4.0 transitional and frameset DTDs. The attributes have the semantics (including case-sensitivity) given in the HTML 4.0 specification.

The attributes are exposed as properties for compatibility with Level 0. This usage is deprecated because it can not be generalized to all possible attribute names, as is required both for XML and potentially for future versions of HTML. We are considering how best to add, get, and remove attributes in a simple and direct way.

DTD Data TypeObject Model Data Type
CDATAString
Value list (e.g.. (left | right | center))String
one-value Value list (e.g. (border))Boolean
NumberLong Integer

The return value of an attribute that has data type that is a value list is always capitalized, independent of the case of the value in the source document. For example, if the value of the align attribute on a P element is "left" then it is returned as "Left". For attributes with the CDATA data type, the case of the return value is that given in the source document.

2.5.2. Naming Exceptions

To avoid name-space conflicts, an attribute with the same name as a keyword in one of our chosen binding languages will be prefixed. For HTML, the prefix used is "html". For example, the for attribute of the LABEL element collides with loop construct naming conventions and is renamed htmlFor.

2.5.3. Exposing Element Type Names (tagName)

The property that exposes the element type name will return this in uppercase. For example, the body element type name is exposed through the "tagName" property as "BODY".

2.5.4. The HTMLElement interface

Interface HTMLElement

All HTML elements derive from this class. Elements that only expose the core attributes are represented by the base HTMLElement interface. These elements are as follows:

Note. The style attribute for this interface is reserved for future usage.

IDL Definition
interface HTMLElement : Element {
           attribute  wstring              id;
           attribute  wstring              title;
           attribute  wstring              lang;
           attribute  wstring              dir;
           attribute  wstring              className;
};

Attributes
id

The element's identifier. See the id attribute definition in HTML 4.0.

title

The element's advisory title. See the title attribute definition in HTML 4.0.

lang

Language code defined in RFC 1766. See the lang attribute definition in HTML 4.0.

dir

Specifies left-to-right or right-to-left direction for weak/neutral text. See the dir attribute definition in HTML 4.0.

className

The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.0.


2.5.5. Object definitions

Interface HTMLHtmlElement

Root of an HTML document. See the HTML element definition in HTML 4.0.

IDL Definition
interface HTMLHtmlElement : HTMLElement {
           attribute  wstring              version;
};

Attributes
version

Version information about the document's DTD. See the version attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLHeadElement

Document head information. See the HEAD element definition in HTML 4.0.

IDL Definition
interface HTMLHeadElement : HTMLElement {
           attribute  wstring              profile;
};

Attributes
profile

URI designating a metadata profile. See the profile attribute definition in HTML 4.0.

Interface HTMLLinkElement

The LINK element specifies a link to an external resource, and defines this document's relationship to that resource (or vice versa). See the LINK element definition in HTML 4.0.

IDL Definition
interface HTMLLinkElement : HTMLElement {
           attribute  boolean              disabled;
           attribute  wstring              charset;
           attribute  wstring              href;
           attribute  wstring              hreflang;
           attribute  wstring              media;
           attribute  wstring              rel;
           attribute  wstring              rev;
           attribute  wstring              target;
           attribute  wstring              type;
};

Attributes
disabled

Enables/disables the link. This is currently only used for stylesheet links, and may be used to activate or deactivate stylesheets.

charset

The character encoding of the resource being linked to. See the charset attribute definition in HTML 4.0.

href

The URI of the linked resource. See the href attribute definition in HTML 4.0.

hreflang

Language code of the linked resource. See the hreflang attribute definition in HTML 4.0.

media

Designed for use with one or more target media. See the media attribute definition in HTML 4.0.

rel

Forward link type. See the rel attribute definition in HTML 4.0.

rev

Reverse link type. See the rev attribute definition in HTML 4.0.

target

Frame to render the resource in. See the target attribute definition in HTML 4.0.

type

Advisory content type. See the type attribute definition in HTML 4.0.

Interface HTMLTitleElement

The document title. See the TITLE element definition in HTML 4.0.

IDL Definition
interface HTMLTitleElement : HTMLElement {
           attribute  wstring              text;
};

Attributes
text

The specified title as a string.

Interface HTMLMetaElement

This contains generic meta-information about the document. See the META element definition in HTML 4.0.

IDL Definition
interface HTMLMetaElement : HTMLElement {
           attribute  wstring              content;
           attribute  wstring              httpEquiv;
           attribute  wstring              name;
           attribute  wstring              scheme;
};

Attributes
content

Associated information. See the content attribute definition in HTML 4.0.

httpEquiv

HTTP response header name. See the http-equiv attribute definition in HTML 4.0.

name

Meta information name. See the name attribute definition in HTML 4.0.

scheme

Select form of content. See the scheme attribute definition in HTML 4.0.

Interface HTMLBaseElement

Document base URI. See the BASE element definition in HTML 4.0.

IDL Definition
interface HTMLBaseElement : HTMLElement {
           attribute  wstring              href;
           attribute  wstring              target;
};

Attributes
href

The base URI See the href attribute definition in HTML 4.0.

target

The default target frame. See the target attribute definition in HTML 4.0.

Interface HTMLIsIndexElement

This element is used for single-line text input. See the ISINDEX element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLIsIndexElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              prompt;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

prompt

The prompt message. See the prompt attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLStyleElement

Style information. A more detailed stylesheet object model will be defined in a separate document. See the STYLE element definition in HTML 4.0.

IDL Definition
interface HTMLStyleElement : HTMLElement {
           attribute  boolean              disabled;
           attribute  wstring              media;
           attribute  wstring              type;
};

Attributes
disabled

Enables/disables the stylesheet.

media

Designed for use with one or more target media. See the media attribute definition in HTML 4.0.

type

The style sheet language (Internet media type). See the type attribute definition in HTML 4.0.

Interface HTMLBodyElement

The HTML document body. This element is always present in the DOM API, even if the tags are not present in the source document. See the BODY element definition in HTML 4.0.

IDL Definition
interface HTMLBodyElement : HTMLElement {
           attribute  wstring              aLink;
           attribute  wstring              background;
           attribute  wstring              bgColor;
           attribute  wstring              link;
           attribute  wstring              text;
           attribute  wstring              vLink;
};

Attributes
aLink

Color of active links (after mouse-button down, but before mouse-button up). See the alink attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

background

URI of the background texture tile image. See the background attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

bgColor

Document background color. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

link

Color of links that are not active and unvisited. See the link attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

text

Document text color. See the text attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

vLink

Color of links that have been visited by the user. See the vlink attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLFormElement

The FORM element encompasses behavior similar to a collection and an element. It provides direct access to the contained input elements as well as the attributes of the form element. See the FORM element definition in HTML 4.0.

IDL Definition
interface HTMLFormElement : HTMLElement {
  readonly attribute  HTMLCollection       elements;
  readonly attribute  long                 length;
           attribute  wstring              name;
           attribute  wstring              acceptCharset;
           attribute  wstring              action;
           attribute  wstring              enctype;
           attribute  wstring              method;
           attribute  wstring              target;
};

Attributes
elements

Returns a collection of all control elements in the form.

length

The number of form controls in the form.

name

Names the form.

acceptCharset

List of character sets supported by the server. See the accept-charset attribute definition in HTML 4.0.

action

Server-side form handler. See the action attribute definition in HTML 4.0.

enctype

The content type of the submitted form, generally "application/x-www-form-urlencoded". See the enctype attribute definition in HTML 4.0.

method

HTTP method used to submit form. See the method attribute definition in HTML 4.0.

target

Frame to render the resource in. See the target attribute definition in HTML 4.0.

Interface HTMLSelectElement

The select element allows the selection of an option. The contained options can be directly accessed through the select element as a collection. See the SELECT element definition in HTML 4.0.

IDL Definition
interface HTMLSelectElement : HTMLElement {
  readonly attribute  wstring              type;
           attribute  long                 selectedIndex;
           attribute  wstring              value;
           attribute  long                 length;
  readonly attribute  HTMLFormElement      form;
           attribute  HTMLCollection       options;
           attribute  boolean              disabled;
           attribute  boolean              multiple;
           attribute  wstring              name;
           attribute  long                 size;
           attribute  long                 tabIndex;
  void                      add(in HTMLElement element, 
                                in HTMLElement before);
  void                      remove(in long index);
  void                      blur();
  void                      focus();
};

Attributes
type

The type of control created.

selectedIndex

The ordinal index of the selected option. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.

value

The current form control value.

length

The number of options in this SELECT.

form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

options

The collection of OPTION elements contained by this element.

disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

multiple

If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.0.

name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

size

Number of visible rows. See the size attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

Methods
add

Add a new element to the collection of OPTION elements for this SELECT.

Parameters
element

The element to add.

before

The element to insert before, or NULL for the head of the list.


This method returns nothing.
This method raises no exceptions.

remove

Remove an element from the collection of OPTION elements for this SELECT. Does nothing if no element has the given index.

Parameters
index

The index of the item to remove.


This method returns nothing.
This method raises no exceptions.

blur

Removes keyboard focus from this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

focus

Gives keyboard focus to this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

Interface HTMLOptGroupElement

Group options together in logical subdivisions. See the OPTGROUP element definition in HTML 4.0.

IDL Definition
interface HTMLOptGroupElement : HTMLElement {
           attribute  boolean              disabled;
           attribute  wstring              label;
};

Attributes
disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

label

Assigns a label to this option group. See the label attribute definition in HTML 4.0.

Interface HTMLOptionElement

A selectable choice. See the OPTION element definition in HTML 4.0.

IDL Definition
interface HTMLOptionElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  boolean              defaultSelected;
  readonly attribute  wstring              text;
           attribute  long                 index;
           attribute  boolean              disabled;
           attribute  wstring              label;
  readonly attribute  boolean              selected;
           attribute  wstring              value;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

defaultSelected

Stores the initial value of the selected attribute.

text

The text contained within the option element.

index

The index of this OPTION in its parent SELECT.

disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

label

Option label for use in hierarchical menus. See the label attribute definition in HTML 4.0.

selected

Means that this option is initially selected. See the selected attribute definition in HTML 4.0.

value

The current form control value. See the value attribute definition in HTML 4.0.

Interface HTMLInputElement

Form control. Note. Depending upon the environment the page is being viewed, the value property may be read-only for the file upload input type. For the "password" input type, the actual value returned may be masked to prevent unauthorized use. See the INPUT element definition in HTML 4.0.

IDL Definition
interface HTMLInputElement : HTMLElement {
           attribute  wstring              defaultValue;
           attribute  boolean              defaultChecked;
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              accept;
           attribute  wstring              accessKey;
           attribute  wstring              align;
           attribute  wstring              alt;
           attribute  boolean              checked;
           attribute  boolean              disabled;
           attribute  long                 maxLength;
           attribute  wstring              name;
           attribute  boolean              readOnly;
           attribute  wstring              size;
           attribute  wstring              src;
           attribute  long                 tabIndex;
  readonly attribute  wstring              type;
           attribute  wstring              useMap;
           attribute  wstring              value;
  void                      blur();
  void                      focus();
  void                      select();
  void                      click();
};

Attributes
defaultValue

Stores the initial control value (i.e., the initial value of value).

defaultChecked

When type has the value "Radio" or "Checkbox", stores the initial value of the checked attribute.

form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

accept

A comma-separated list of content types that a server processing this form will handle correctly. See the accept attribute definition in HTML 4.0.

accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

alt

Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.0.

checked

Describes whether a radio or check box is checked, when type has the value "Radio" or "Checkbox". The value is TRUE if explicitly set. Represents the current state of the checkbox or radio button. See the checked attribute definition in HTML 4.0.

disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

maxLength

Maximum number of characters for text fields, when type has the value "Text" or "Password". See the maxlength attribute definition in HTML 4.0.

name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

readOnly

This control is read-only. When type has the value "text" or "password" only. See the readonly attribute definition in HTML 4.0.

size

Size information. The precise meaning is specific to each type of field. See the size attribute definition in HTML 4.0.

src

When the type attribute has the value "Image", this attribute specifies the location of the image to be used to decorate the graphical submit button. See the src attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

type

The type of control created. See the type attribute definition in HTML 4.0.

useMap

Use client-side image map. See the usemap attribute definition in HTML 4.0.

value

The current form control value. Used for radio buttons and check boxes. See the value attribute definition in HTML 4.0.

Methods
blur

Removes keyboard focus from this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

focus

Gives keyboard focus to this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

select

Select the contents of the text area. For INPUT elements whose type attribute has one of the following values: "Text", "File", or "Password".


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

click

Simulate a mouse-click. For INPUT elements whose type attribute has one of the following values: "Button", "Checkbox", "Radio", "Reset", or "Submit".


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

Interface HTMLTextAreaElement

Multi-line text field. See the TEXTAREA element definition in HTML 4.0.

IDL Definition
interface HTMLTextAreaElement : HTMLElement {
           attribute  wstring              defaultValue;
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              accessKey;
           attribute  long                 cols;
           attribute  boolean              disabled;
           attribute  wstring              name;
           attribute  boolean              readOnly;
           attribute  long                 rows;
           attribute  long                 tabIndex;
  readonly attribute  wstring              type;
  void                      blur();
  void                      focus();
  void                      select();
};

Attributes
defaultValue

Stores the initial control value (i.e., the initial value of value).

form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

cols

Width of control (in characters). See the cols attribute definition in HTML 4.0.

disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

readOnly

This control is read-only. See the readonly attribute definition in HTML 4.0.

rows

Number of text rows. See the rows attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

type

The type of this form control.

Methods
blur

Removes keyboard focus from this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

focus

Gives keyboard focus to this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

select

Select the contents of the TEXTAREA.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

Interface HTMLButtonElement

Push button. See the BUTTON element definition in HTML 4.0.

IDL Definition
interface HTMLButtonElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              accessKey;
           attribute  boolean              disabled;
           attribute  wstring              name;
           attribute  long                 tabIndex;
  readonly attribute  wstring              type;
           attribute  wstring              value;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

disabled

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

type

The type of button. See the type attribute definition in HTML 4.0.

value

The current form control value. See the value attribute definition in HTML 4.0.

Interface HTMLLabelElement

Form field label text. See the LABEL element definition in HTML 4.0.

IDL Definition
interface HTMLLabelElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              accessKey;
           attribute  wstring              htmlFor;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

htmlFor

This attribute links this label with another form control by id attribute. See the for attribute definition in HTML 4.0.

Interface HTMLFieldSetElement

Organizes form controls into logical groups. See the FIELDSET element definition in HTML 4.0.

IDL Definition
interface HTMLFieldSetElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

Interface HTMLLegendElement

Provides a caption for a FIELDSET grouping. See the LEGEND element definition in HTML 4.0.

IDL Definition
interface HTMLLegendElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              accessKey;
           attribute  wstring              align;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

align

Text alignment relative to FIELDSET. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLUListElement

Unordered list. See the UL element definition in HTML 4.0.

IDL Definition
interface HTMLUListElement : HTMLElement {
           attribute  boolean              compact;
           attribute  wstring              type;
};

Attributes
compact

Reduce spacing between list items. See the compact attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

type

Bullet style. See the type attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLOListElement

Ordered list. See the OL element definition in HTML 4.0.

IDL Definition
interface HTMLOListElement : HTMLElement {
           attribute  boolean              compact;
           attribute  long                 start;
           attribute  wstring              type;
};

Attributes
compact

Reduce spacing between list items. See the compact attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

start

Starting sequence number. See the start attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

type

Numbering style. See the type attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLDListElement

Definition list. See the DL element definition in HTML 4.0.

IDL Definition
interface HTMLDListElement : HTMLElement {
           attribute  boolean              compact;
};

Attributes
compact

Reduce spacing between list items. See the compact attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLDirectoryElement

Directory list. See the DIR element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLDirectoryElement : HTMLElement {
           attribute  boolean              compact;
};

Attributes
compact

Reduce spacing between list items. See the compact attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLMenuElement

Menu list. See the MENU element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLMenuElement : HTMLElement {
           attribute  boolean              compact;
};

Attributes
compact

Reduce spacing between list items. See the compact attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLLIElement

List item. See the LI element definition in HTML 4.0.

IDL Definition
interface HTMLLIElement : HTMLElement {
           attribute  wstring              type;
           attribute  long                 value;
};

Attributes
type

List item bullet style. See the type attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

value

Reset sequence number when used in OL See the value attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLBlockquoteElement

??? See the BLOCKQUOTE element definition in HTML 4.0.

IDL Definition
interface HTMLBlockquoteElement : HTMLElement {
           attribute  wstring              cite;
};

Attributes
cite

A URI designating a document that describes the reason for the change. See the cite attribute definition in HTML 4.0.

Interface HTMLDivElement

Generic block container. See the DIV element definition in HTML 4.0.

IDL Definition
interface HTMLDivElement : HTMLElement {
           attribute  wstring              align;
};

Attributes
align

Horizontal text alignment. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLParagraphElement

Paragraphs. See the P element definition in HTML 4.0.

IDL Definition
interface HTMLParagraphElement : HTMLElement {
           attribute  wstring              align;
};

Attributes
align

Horizontal text alignment. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLHeadingElement

For the H1 to H6 elements. See the H1 element definition in HTML 4.0.

IDL Definition
interface HTMLHeadingElement : HTMLElement {
           attribute  wstring              align;
};

Attributes
align

Horizontal text alignment. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLQuoteElement

For the Q and BLOCKQUOTE elements. See the Q element definition in HTML 4.0.

IDL Definition
interface HTMLQuoteElement : HTMLElement {
           attribute  wstring              cite;
};

Attributes
cite

A URI designating a document that describes the reason for the change. See the cite attribute definition in HTML 4.0.

Interface HTMLPreElement

Preformatted text. See the PRE element definition in HTML 4.0.

IDL Definition
interface HTMLPreElement : HTMLElement {
           attribute  long                 width;
};

Attributes
width

Fixed width for content. See the width attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLBRElement

Force a line break. See the BR element definition in HTML 4.0.

IDL Definition
interface HTMLBRElement : HTMLElement {
           attribute  wstring              clear;
};

Attributes
clear

Control flow of text around floats. See the clear attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLBaseFontElement

Base font. See the BASEFONT element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLBaseFontElement : HTMLElement {
           attribute  wstring              color;
           attribute  wstring              face;
           attribute  wstring              size;
};

Attributes
color

Font color. See the color attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

face

Font face identifier. See the face attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

size

Font size. See the size attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLFontElement

Local change to font. See the FONT element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLFontElement : HTMLElement {
           attribute  wstring              color;
           attribute  wstring              face;
           attribute  wstring              size;
};

Attributes
color

Font color. See the color attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

face

Font face identifier. See the face attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

size

Font size. See the size attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLHRElement

Create a horizontal rule. See the HR element definition in HTML 4.0.

IDL Definition
interface HTMLHRElement : HTMLElement {
           attribute  wstring              align;
           attribute  boolean              noShade;
           attribute  wstring              size;
           attribute  wstring              width;
};

Attributes
align

Align the rule on the page. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

noShade

Indicates to the user agent that there should be no shading in the rendering of this element. See the noshade attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

size

The height of the rule. See the size attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

width

The width of the rule. See the width attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLInsElement

Inserted content. See the INS element definition in HTML 4.0.

IDL Definition
interface HTMLInsElement : HTMLElement {
           attribute  wstring              cite;
           attribute  wstring              dateTime;
};

Attributes
cite

A URI designating a document that describes the reason for the change. See the cite attribute definition in HTML 4.0.

dateTime

The date and time of the change. See the datetime attribute definition in HTML 4.0.

Interface HTMLDelElement

Deleted content. See the DEL element definition in HTML 4.0.

IDL Definition
interface HTMLDelElement : HTMLElement {
           attribute  wstring              cite;
           attribute  wstring              dateTime;
};

Attributes
cite

A URI designating a document that describes the reason for the change. See the cite attribute definition in HTML 4.0.

dateTime

The date and time of the change. See the datetime attribute definition in HTML 4.0.

Interface HTMLModElement

Notice of modification to part of a document.

IDL Definition
interface HTMLModElement : HTMLElement {
           attribute  wstring              cite;
           attribute  wstring              dateTime;
};

Attributes
cite

A URI designating a document that describes the reason for the change. See the HTMLDelElement.

dateTime

The date and time of the change. See the HTMLDelElement.

Interface HTMLAnchorElement

The anchor element. See the A element definition in HTML 4.0.

IDL Definition
interface HTMLAnchorElement : HTMLElement {
           attribute  wstring              accessKey;
           attribute  wstring              charset;
           attribute  wstring              coords;
           attribute  wstring              href;
           attribute  wstring              hreflang;
           attribute  wstring              name;
           attribute  wstring              rel;
           attribute  wstring              rev;
           attribute  wstring              shape;
           attribute  long                 tabIndex;
           attribute  wstring              target;
           attribute  wstring              type;
  void                      blur();
  void                      focus();
};

Attributes
accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

charset

The character encoding of the linked resource. See the charset attribute definition in HTML 4.0.

coords

Comma-separated list of lengths, defining an active region geometry. See also shape for the shape of the region. See the coords attribute definition in HTML 4.0.

href

The URI of the linked resource. See the href attribute definition in HTML 4.0.

hreflang

Language code of the linked resource. See the hreflang attribute definition in HTML 4.0.

name

Anchor name. Note. For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute. See the name attribute definition in HTML 4.0.

rel

Forward link type. See the rel attribute definition in HTML 4.0.

rev

Reverse link type. See the rev attribute definition in HTML 4.0.

shape

The shape of the active area. The coordinates are given by coords. See the shape attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

target

Frame to render the resource in. See the target attribute definition in HTML 4.0.

type

Advisory content type. See the type attribute definition in HTML 4.0.

Methods
blur

Removes keyboard focus from this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

focus

Gives keyboard focus to this element.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

Interface HTMLImageElement

Embedded image. See the IMG element definition in HTML 4.0.

IDL Definition
interface HTMLImageElement : HTMLElement {
           attribute  wstring              lowSrc;
           attribute  wstring              name;
           attribute  wstring              align;
           attribute  wstring              alt;
           attribute  wstring              border;
           attribute  wstring              height;
           attribute  wstring              hspace;
           attribute  boolean              isMap;
           attribute  wstring              longDesc;
           attribute  wstring              src;
           attribute  wstring              useMap;
           attribute  wstring              vspace;
           attribute  wstring              width;
};

Attributes
lowSrc

URI designating the source of this image, for low-resolution output.

name

The name of the element (for backwards compatibility).

align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

alt

Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.0.

border

Width of border around image. See the border attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

height

Override height. See the height attribute definition in HTML 4.0.

hspace

Horizontal space to the left and right of this image, applet, or object. See the hspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

isMap

Use server-side image map. See the ismap attribute definition in HTML 4.0.

longDesc

URI designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.0.

src

URI designating the source of this image. See the src attribute definition in HTML 4.0.

useMap

Use client-side image map. See the usemap attribute definition in HTML 4.0.

vspace

Vertical space above and below this image, applet, or object. See the vspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

width

Override width. See the width attribute definition in HTML 4.0.

Interface HTMLObjectElement

Generic embedded object. Note. In principle, all properties on the object element are read-write but in some environments some properties may be read-only once the underlying object is instantiated. See the OBJECT element definition in HTML 4.0.

IDL Definition
interface HTMLObjectElement : HTMLElement {
  readonly attribute  HTMLFormElement      form;
           attribute  wstring              code;
           attribute  wstring              align;
           attribute  wstring              archive;
           attribute  wstring              border;
           attribute  wstring              codeBase;
           attribute  wstring              codeType;
           attribute  wstring              data;
           attribute  boolean              declare;
           attribute  wstring              height;
           attribute  wstring              hspace;
           attribute  wstring              name;
           attribute  wstring              standby;
           attribute  long                 tabIndex;
           attribute  wstring              type;
           attribute  wstring              useMap;
           attribute  wstring              vspace;
           attribute  wstring              width;
};

Attributes
form

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

code

Applet class file. See the code attribute for HTMLAppletElement.

align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

archive

Space-separated list of archives. See the archive attribute definition in HTML 4.0.

border

Width of border around the object. See the border attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

codeBase

Base URI for classid, data, and archive attributes. See the codebase attribute definition in HTML 4.0.

codeType

Content type for data downloaded via classid attribute. See the codetype attribute definition in HTML 4.0.

data

A URI specifying the location of the object's data. See the data attribute definition in HTML 4.0.

declare

Declare (for future reference), but do not instantiate, this object. See the declare attribute definition in HTML 4.0.

height

Override height. See the height attribute definition in HTML 4.0.

hspace

Horizontal space to the left and right of this image, applet, or object. See the hspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

name

Form control or object name when submitted with a form. See the name attribute definition in HTML 4.0.

standby

Message to render while loading the object. See the standby attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

type

Content type for data downloaded via data attribute. See the type attribute definition in HTML 4.0.

useMap

Use client-side image map. See the usemap attribute definition in HTML 4.0.

vspace

Vertical space above and below this image, applet, or object. See the vspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

width

Override width. See the width attribute definition in HTML 4.0.

Interface HTMLParamElement

Parameters fed to the OBJECT element. See the PARAM element definition in HTML 4.0.

IDL Definition
interface HTMLParamElement : HTMLElement {
           attribute  wstring              name;
           attribute  wstring              type;
           attribute  wstring              value;
           attribute  wstring              valueType;
};

Attributes
name

The name of a run-time parameter. See the name attribute definition in HTML 4.0.

type

Content type for the value attribute when valuetype has the value "ref". See the type attribute definition in HTML 4.0.

value

The value of a run-time parameter. See the value attribute definition in HTML 4.0.

valueType

Information about the meaning of the value attribute value. See the valuetype attribute definition in HTML 4.0.

Interface HTMLAppletElement

Insert a script. See the APPLET element definition in HTML 4.0. This element is deprecated in HTML 4.0.

IDL Definition
interface HTMLAppletElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              alt;
           attribute  wstring              archive;
           attribute  wstring              code;
           attribute  wstring              codeBase;
           attribute  wstring              height;
           attribute  wstring              hspace;
           attribute  wstring              name;
           attribute  wstring              object;
           attribute  wstring              vspace;
           attribute  wstring              width;
};

Attributes
align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

alt

Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

archive

Comma-separated archive list. See the archive attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

code

Applet class file. See the code attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

codeBase

Optional base URI for applet. See the codebase attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

height

Override height. See the height attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

hspace

Horizontal space to the left and right of this image, applet, or object. See the hspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

name

The name of the applet. See the name attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

object

Serialized applet file. See the object attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

vspace

Vertical space above and below this image, applet, or object. See the vspace attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

width

Override width. See the width attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLMapElement

Client-side image map. See the MAP element definition in HTML 4.0.

IDL Definition
interface HTMLMapElement : HTMLElement {
  readonly attribute  HTMLCollection       areas;
           attribute  wstring              name;
};

Attributes
areas

The list of areas defined for the image map.

name

Names the map (for use with usemap). See the name attribute definition in HTML 4.0.

Interface HTMLAreaElement

Client-side image map area definition. See the AREA element definition in HTML 4.0.

IDL Definition
interface HTMLAreaElement : HTMLElement {
           attribute  wstring              accessKey;
           attribute  wstring              alt;
           attribute  wstring              coords;
           attribute  wstring              href;
           attribute  boolean              noHref;
           attribute  wstring              shape;
           attribute  long                 tabIndex;
           attribute  wstring              target;
};

Attributes
accessKey

A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

alt

Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.0.

coords

Comma-separated list of lengths, defining an active region geometry. See also shape for the shape of the region. See the coords attribute definition in HTML 4.0.

href

The URI of the linked resource. See the href attribute definition in HTML 4.0.

noHref

Specifies that this area is inactive, i.e., has no associated action. See the nohref attribute definition in HTML 4.0.

shape

The shape of the active area. The coordinates are given by coords. See the shape attribute definition in HTML 4.0.

tabIndex

Index that represents the element's position in the tabbing order. See the tabindex attribute definition in HTML 4.0.

target

Frame to render the resource in. See the target attribute definition in HTML 4.0.

Interface HTMLScriptElement

Script statements. See the SCRIPT element definition in HTML 4.0.

IDL Definition
interface HTMLScriptElement : HTMLElement {
           attribute  wstring              text;
           attribute  wstring              htmlFor;
           attribute  wstring              event;
           attribute  wstring              charset;
           attribute  boolean              defer;
           attribute  wstring              src;
           attribute  wstring              type;
};

Attributes
text

The script content of the element.

htmlFor

Reserved for future use.

event

Reserved for future use.

charset

The character encoding of the linked resource. See the charset attribute definition in HTML 4.0.

defer

Indicates that the user agent can defer processing of the script. See the defer attribute definition in HTML 4.0.

src

URI designating an external script. See the src attribute definition in HTML 4.0.

type

The content type of the script language. See the type attribute definition in HTML 4.0.

Interface HTMLTableElement

The create* and delete* methods on the table allow authors to construct and modify tables. HTML 4.0 specifies that a table may only contain one CAPTION, THEAD, and TFOOT element can exist in a table. Therefore, one exists, and the createTHead() or createTFoot() method is called, the method returns the existing THead or TFoot element. See the TABLE element definition in HTML 4.0.

IDL Definition
interface HTMLTableElement : HTMLElement {
           attribute  HTMLTableCaptionElement caption;
           attribute  HTMLTableSectionElement tHead;
           attribute  HTMLTableSectionElement tFoot;
  readonly attribute  HTMLCollection       rows;
           attribute  HTMLCollection       tBodies;
           attribute  wstring              align;
           attribute  wstring              bgColor;
           attribute  wstring              border;
           attribute  wstring              cellPadding;
           attribute  wstring              cellSpacing;
           attribute  wstring              frame;
           attribute  wstring              rules;
           attribute  wstring              summary;
           attribute  wstring              width;
  HTMLElement               createTHead();
  void                      deleteTHead();
  HTMLElement               createTFoot();
  void                      deleteTFoot();
  HTMLElement               createCaption();
  void                      deleteCaption();
  HTMLElement               insertRow(in long index);
  void                      deleteRow(in long index);
};

Attributes
caption

Returns the table's CAPTION, or void if none exists.

tHead

Returns the table's THEAD, or void if none exists.

tFoot

Returns the table's TFOOT, or void if none exists.

rows

Returns a collection of all rows of the table.

tBodies

Returns a collection of the defined table bodies.

align

Specifies the table's position with respect to the rest of the document. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

bgColor

Cell background color. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

border

The width of the border around the table. See the border attribute definition in HTML 4.0.

cellPadding

Specifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.0.

cellSpacing

Specifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.0.

frame

Specifies which external table borders to render. See the frame attribute definition in HTML 4.0.

rules

Specifies which internal table borders to render. See the rules attribute definition in HTML 4.0.

summary

Supplementary description about the purpose or structure of a table. See the summary attribute definition in HTML 4.0.

width

Specifies the desired table width. See the width attribute definition in HTML 4.0.

Methods
createTHead

Create a table header row or return an existing one.

Return Values

A new table header element (THEAD).


This method has no parameters.
This method raises no exceptions.
deleteTHead

Delete the header from the table, if one exists.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

createTFoot

Create a table footer row or return an existing one.

Return Values

A footer element (TFOOT).


This method has no parameters.
This method raises no exceptions.
deleteTFoot

Delete the footer from the table, if one exists.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

createCaption

Create a new table caption object or return an existing one.

Return Values

A CAPTION element.


This method has no parameters.
This method raises no exceptions.
deleteCaption

Delete the table caption, if one exists.


This method has no parameters.
This method returns nothing.
This method raises no exceptions.

insertRow

Insert a new empty row in the table. Note. A table row cannot be empty according to HTML 4.0 Recommendation.

Parameters
index

The row number where to insert a new row.

Return Values

The newly created row.


This method raises no exceptions.
deleteRow

Delete a table row.

Parameters
index

The index of the row to be deleted.


This method returns nothing.
This method raises no exceptions.

Interface HTMLTableCaptionElement

Table caption See the CAPTION element definition in HTML 4.0.

IDL Definition
interface HTMLTableCaptionElement : HTMLElement {
           attribute  wstring              align;
};

Attributes
align

Caption alignment with respect to the table. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLTableColElement

Regroups the COL and COLGROUP elements. See the COL element definition in HTML 4.0.

IDL Definition
interface HTMLTableColElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  long                 span;
           attribute  wstring              vAlign;
           attribute  wstring              width;
};

Attributes
align

Horizontal alignment of cell data in column. See the align attribute definition in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

span

Indicates the number of columns in a group or affected by a grouping. See the span attribute definition in HTML 4.0.

vAlign

Vertical alignment of cell data in column. See the valign attribute definition in HTML 4.0.

width

Default column width. See the width attribute definition in HTML 4.0.

Interface HTMLTheadElement

THEAD element. See the THEAD element definition in HTML 4.0.

IDL Definition
interface HTMLTheadElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  wstring              vAlign;
};

Attributes
align

Horizontal alignment of data in table header cells. See the align attribute definition in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

vAlign

Vertical alignment of data in table header cells. See the valign attribute definition in HTML 4.0.

Interface HTMLTbodyElement

TBODY See the TBODY element definition in HTML 4.0.

IDL Definition
interface HTMLTbodyElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  wstring              vAlign;
};

Attributes
align

Horizontal alignment of data in table footer cells. See the align attribute definition in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

vAlign

Vertical alignment of data in table footer cells. See the valign attribute definition in HTML 4.0.

Interface HTMLTfootElement

TFOOT element. See the TFOOT element definition in HTML 4.0.

IDL Definition
interface HTMLTfootElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  wstring              vAlign;
};

Attributes
align

Specifies horizontal alignment. See the align attribute definition in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

vAlign

Vertical alignment. See the valign attribute definition in HTML 4.0.

Interface HTMLTableSectionElement

The THEAD, TFOOT, and TBODY elements.

IDL Definition
interface HTMLTableSectionElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              vAlign;
           attribute  HTMLCollection       rows;
  HTMLElement               insertRow(in long index);
  void                      deleteRow(in long index);
};

Attributes
align

Horizontal alignment of data in cells. See the align attribute for HTMLTheadElement for details.

vAlign

Vertical alignment of data in cells. See the valign attribute for HTMLTheadElement for details.

rows

The collection of rows in this table section.

Methods
insertRow

Insert a row into this section.

Parameters
index

The row number where to insert a new row.

Return Values

The newly created row.


This method raises no exceptions.
deleteRow

Delete a row from this section.

Parameters
index

The index of the row to be deleted.


This method returns nothing.
This method raises no exceptions.

Interface HTMLTableRowElement

A row in a table. See the TR element definition in HTML 4.0.

IDL Definition
interface HTMLTableRowElement : HTMLElement {
           attribute  long                 rowIndex;
           attribute  long                 sectionRowIndex;
           attribute  HTMLCollection       cells;
           attribute  wstring              align;
           attribute  wstring              bgColor;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  wstring              vAlign;
  HTMLElement               insertCell(in long index);
  void                      deleteCell(in long index);
};

Attributes
rowIndex

The index of this row, relative to the entire table.

sectionRowIndex

The index of this row, relative to the current section (THEAD, TFOOT, or TBODY).

cells

The collection of cells in this row.

align

Horizontal alignment of data within cells of this row. See the align attribute definition in HTML 4.0.

bgColor

Background color for rows. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

vAlign

Vertical alignment of data within cells of this row. See the valign attribute definition in HTML 4.0.

Methods
insertCell

Insert an empty cell into this row.

Parameters
index

The place to insert the cell.

Return Values

The newly created cell.


This method raises no exceptions.
deleteCell

Delete a cell from the current row.

Parameters
index

The index of the cell to delete.


This method returns nothing.
This method raises no exceptions.

Interface HTMLTableCellElement

The object used to represent the TH and TD elements. See the TD element definition in HTML 4.0.

IDL Definition
interface HTMLTableCellElement : HTMLElement {
           attribute  long                 cellIndex;
           attribute  wstring              abbr;
           attribute  wstring              align;
           attribute  wstring              axis;
           attribute  wstring              bgColor;
           attribute  wstring              ch;
           attribute  wstring              chOff;
           attribute  long                 colSpan;
           attribute  wstring              headers;
           attribute  wstring              height;
           attribute  boolean              noWrap;
           attribute  long                 rowSpan;
           attribute  wstring              scope;
           attribute  wstring              vAlign;
           attribute  wstring              width;
};

Attributes
cellIndex

The index of this cell in the row.

abbr

Abbreviation for header cells. See the abbr attribute definition in HTML 4.0.

align

Horizontal alignment of data in cell. See the align attribute definition in HTML 4.0.

axis

Names group of related headers. See the axis attribute definition in HTML 4.0.

bgColor

Cell background color. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

ch

Alignment character for cells in a column. See the char attribute definition in HTML 4.0.

chOff

Offset of alignment character. See the charoff attribute definition in HTML 4.0.

colSpan

Number of columns spanned by cell. See the colspan attribute definition in HTML 4.0.

headers

List of id attribute values for header cells. See the headers attribute definition in HTML 4.0.

height

Cell height. See the height attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

noWrap

Suppress word wrapping. See the nowrap attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

rowSpan

Number of rows spanned by cell. See the rowspan attribute definition in HTML 4.0.

scope

Scope covered by header cells. See the scope attribute definition in HTML 4.0.

vAlign

Vertical alignment of data in cell. See the valign attribute definition in HTML 4.0.

width

Cell width. See the width attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

Interface HTMLFrameSetElement

Create a grid of frames. See the FRAMESET element definition in HTML 4.0.

IDL Definition
interface HTMLFrameSetElement : HTMLElement {
           attribute  wstring              cols;
           attribute  wstring              rows;
};

Attributes
cols

The number of columns of frames in the frameset. See the cols attribute definition in HTML 4.0.

rows

The number of rows of frames in the frameset. See the rows attribute definition in HTML 4.0.

Interface HTMLFrameElement

Create a frame. See the FRAME element definition in HTML 4.0.

IDL Definition
interface HTMLFrameElement : HTMLElement {
           attribute  wstring              frameBorder;
           attribute  wstring              longDesc;
           attribute  wstring              marginHeight;
           attribute  wstring              marginWidth;
           attribute  wstring              name;
           attribute  boolean              noResize;
           attribute  wstring              scrolling;
           attribute  wstring              src;
};

Attributes
frameBorder

Request frame borders. See the frameborder attribute definition in HTML 4.0.

longDesc

URI designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.0.

marginHeight

Frame margin height, in pixels. See the marginheight attribute definition in HTML 4.0.

marginWidth

Frame margin width, in pixels. See the marginwidth attribute definition in HTML 4.0.

name

The frame name (object of the target attribute). See the name attribute definition in HTML 4.0.

noResize

When true, forbid user from resizing frame. See the noresize attribute definition in HTML 4.0.

scrolling

Specify whether or not the frame should have scrollbars. See the scrolling attribute definition in HTML 4.0.

src

A URI designating the initial frame contents. See the src attribute definition in HTML 4.0.

Interface HTMLIFrameElement

Inline subwindows. See the IFRAME element definition in HTML 4.0.

IDL Definition
interface HTMLIFrameElement : HTMLElement {
           attribute  wstring              align;
           attribute  wstring              frameBorder;
           attribute  wstring              height;
           attribute  wstring              longDesc;
           attribute  wstring              marginHeight;
           attribute  wstring              marginWidth;
           attribute  wstring              name;
           attribute  wstring              scrolling;
           attribute  wstring              src;
           attribute  wstring              width;
};

Attributes
align

Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

frameBorder

Request frame borders. See the frameborder attribute definition in HTML 4.0.

height

Frame height. See the height attribute definition in HTML 4.0.

longDesc

URI designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.0.

marginHeight

Frame margin height, in pixels. See the marginheight attribute definition in HTML 4.0.

marginWidth

Frame margin width, in pixels. See the marginwidth attribute definition in HTML 4.0.

name

The frame name (object of the target attribute). See the name attribute definition in HTML 4.0.

scrolling

Specify whether or not the frame should have scrollbars. See the scrolling attribute definition in HTML 4.0.

src

A URI designating the initial frame contents. See the src attribute definition in HTML 4.0.

width

Frame width. See the width attribute definition in HTML 4.0.