Platform Support
| IE | Mozilla | Netscape | Opera | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
|---|---|---|---|---|---|---|---|---|
|
HTMLElement Constructor() : HTMLElement
HTMLElement is the parent class of all HTML elements.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||
HTMLElement() : HTMLElementHTMLElement is the parent class of all HTML elements. Returns
|
||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|---|
|
Character for the hotkey that gives focus to the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Array of all of the elements in the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Alignment property for the element. Used for display elements. (e.g. "center")
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
attributes
: Array
Array of attributes for the element.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Gets or sets a time delay to lapse before the element starts "playing".
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
Array of behaviors attached to the element.
|
No Details | 5.0+ | no | no | no | no |
|
|
||||||
|
If true, indicates that the element can have child nodes.
|
No Details | 5.0+ | no | no | no | no |
|
|
||||||
|
If true, indicates that the element can contain HTML tags.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
childNodes
: Array
Array of the child nodes of the element.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
children
: Array
Array of the child nodes of the element.
|
Show Details | 4.0+ | no | no | 8.0+ | 1.3+ |
|
||||||
|
className
: String
Name of the CSS class that the element belongs to.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Height of the content of the element (in pixels).
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Number of pixels between the offsetLeft property of the element and the start of the content of the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Number of pixels between the offsetTop property of the element and the top of the content of the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Width of the content of the element (in pixels).
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Indicates whether the content of the element is editable. Possible values are "inherit", "true", or "false".
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
currentStyle
: Object
Reference to the Style object specifying the styles applied to the element.
|
Show Details | 5.0+ | no | no | no | no |
|
||||||
|
dir
: String
Direction of the text in the element. Possible values are "ltr" (left-to-right) or "rtl" (right-to-left).
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
disabled
: Boolean
If true, indicates that the element is disabled.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Reference to the parent Document object for the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Array of Microsoft CSS filters on the element.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
firstChild
: Object
Reference to the first child element of the element, if one exists.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
If true, indicates that the element is an HTML+TIME media element.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
If true, the element does not give any visual cues to indicate when it has focus.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
id
: String
Unique identifier for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
innerHTML
: String
HTML content within the tags of the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
innerText
: String
Text string enclosed by the tags of the element. Any HTML tags will be interpreted as part of the text string, not as HTML.
|
Show Details | 4.0+ | no | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
If true, indicates that the user can edit the contents of the element.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
If true, indicates that the element is disabled from user interaction.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
If true, indicates that a TextRange object can be created using the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
lang
: String
Language code for the content of the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
| No Details | 4.0+ | no | no | no | no | |
|
|
||||||
|
lastChild
: Object
Reference to the last child element of the element, if it exists.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Local XML name for the element.
|
No Details | no | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
The XML Namespace URI for the element.
|
No Details | no | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
nextSibling
: Object
Reference to the next sibling element of the element.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
nodeName
: String
Name of the element tag.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 8.0+ | 1.3+ |
|
||||||
|
nodeType
: Number
Node type for the element. See Remarks for full explanation.
|
Show Details | 5.5+ | 1.0+ | 6.0+ | 8.0+ | 1.3+ |
|
||||||
|
nodeValue
: String
Value of the element.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 8.0+ | 1.3+ |
|
||||||
|
offsetHeight
: Number
Height of the element (in pixels).
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
offsetLeft
: Number
Number of pixels the left edge of the element is offset from the left edge of its parent element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
offsetParent
: Object
Reference to the parent object corresponding with the offsetHeight, offsetWidth, offsetLeft, and offsetTop properties.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Number of pixels the top edge of the element is offset from the top edge of its parent element.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Width of the element (in pixels).
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Fires when the element becomes active.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before the selection is copied to the clipboard.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires immediately before the selection is cut to the clipboard.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires immediately before the element stops being the active element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before the element receives focus prior to being edited.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before the selection is pasted from the clipboard to the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element loses focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the element is clicked.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the element is right-clicked and the context menu opens.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires immediately before the element is selected.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when the element is copied to the clipboard.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element is cut to the clipboard.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element is double-clicked.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the active element becomes inactive.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when the element is dragged.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element is released from being dragged.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element has another object dragged onto it that can be dropped on the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when an element has an object dragged out of it that could be dropped onto the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when an element has an object dragged over it that could be dropped onto the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires immediately before an element is dragged.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when an object is dropped onto the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the CSS Filter of an element changes or finishes transitioning.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when the element receives focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when a user presses the F1 key to activate help.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when a user presses down on a key while the element has focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when a user presses a key or holds down the key while the element has focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when a user releases a key while the element has focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the element loses mouse capture.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when a user clicks down on the mouse button while the element has focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
onmouseenter
: Function
Fires when the mouse pointer enters the element.
|
Show Details | 4.0+ | no | no | no | no |
|
||||||
|
onmouseleave
: Function
Fires when the mouse pointer leaves the element.
|
Show Details | 4.0+ | no | no | no | no |
|
||||||
|
Fires when the mouse moves while the pointer over the element.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the mouse pointer moves off of the element.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the mouse pointer moves over the element.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the user releases the mouse button while the element has focus.
|
No Details | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+ |
|
|
||||||
|
Fires when the clipboard contents are pasted onto the element.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when one of the properties of the element changes.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires when the ready state of the element changes.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before an element is about to be resized.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
Fires when the element is finished being resized.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before a user resizes the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Fires immediately before the element is selected.
|
No Details | 4.0+ | no | no | no | 1.0+ |
|
|
||||||
|
outerHTML
: String
HTML mark-up for an element, including start and end tags and any content between the tags.
|
Show Details | 4.0+ | no | no | 8.0+ | 1.3+ |
|
||||||
|
outerText
: String
Plain text for an element, including start and end tags.
|
Show Details | 4.0+ | no | no | 8.0+ | 1.3+ |
|
||||||
|
ownerDocument
: Object
Reference to the document that contains the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
Reference to the direct parent element of the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
parentNode
: Object
Reference to the direct parent node of the element, if it exists.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 4.0+ | 1.0+ |
|
||||||
|
Reference to the closest parent element to the current element that can create a TextRange that contains the current element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Prefix XML name for the element.
|
No Details | no | 1.0+ | no | 4.0+ | 1.0+ |
|
|
||||||
|
previousSibling
: Object
Reference to the previous sibling element of the element, if it exists.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 4.0+ | 1.0+ |
|
||||||
|
readyState
: String
Current readiness state of the element. See Remarks for possible values.
|
Show Details | 4.0+ | no | no | no | no |
|
||||||
|
Record number for the data set that generated the element.
|
No Details | 4.0+ | no | no | no | no |
|
|
||||||
|
Reference to the Style object specifying the current runtime style(s) of the element.
|
No Details | 5.0+ | no | no | no | no |
|
|
||||||
|
XML scope of the element.
|
No Details | 5.0+ | no | no | no | no |
|
|
||||||
|
Height (in pixels) of the total content area of the element.
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Number of pixels between the actual left edge of the element to the displayed left edge of the element.
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Number of pixels between the actual top edge of the element to the displayed top edge of the element.
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
Width (in pixels) of the total content area of the element.
|
No Details | 4.0+ | 1.0+ | 7.0+ | 7.0+ | 1.0+ |
|
|
||||||
|
sourceIndex
: Number
Index of the element in the Document.all[] array.
|
Show Details | 4.0+ | no | no | 8.0+ | no |
|
||||||
|
style
: HTMLStyleObject
Reference to the inline CSS style for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
If true, indicates that the time container of the element must synchronize playback with the element. Default is false.
|
No Details | 5.5+ | no | no | no | no |
|
|
||||||
|
Indicates the tab order index for the element.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
