htmlelement (JavaScript 1.0)

HTMLElement is the parent class of all HTML elements.

Properties & Events

KeyDescriptionAvailability
attributesArray of attributes for the element.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
childnodesArray of the child nodes of the element.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
childrenArray of the child nodes of the element.
chrome 1.3safari 1.3Firefox ??ie 4.0opera 8.0
classnameName of the CSS class that the element belongs to.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
clientheightHeight of the content of the element (in pixels).
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
clientwidthWidth of the content of the element (in pixels).
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
dirDirection of the text in the element. Possible values are "ltr" (left-to-right) or "rtl" (right-to-left).
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
disabledIf true, indicates that the element is disabled.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
firstchildReference to the first child element of the element, if one exists.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
idUnique identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
innerhtmlHTML content within the tags of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
innertextText string enclosed by the tags of the element. Any HTML tags will be interpreted as part of the text string, not as HTML.
chrome 1.0safari 1.0Firefox ??ie 4.0opera 7.0
langLanguage code for the content of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
lastchildReference to the last child element of the element, if it exists.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
localnameLocal XML name for the element.
chrome 1.0safari 1.0Firefox 1.0ie ??opera 7.0
namespaceuriThe XML Namespace URI for the element.
chrome 1.0safari 1.0Firefox 1.0ie ??opera 7.0
nextsiblingReference to the next sibling element of the element.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 7.0
nodenameName of the element tag.
chrome 1.3safari 1.3Firefox 1.0ie 5.0opera 8.0
nodetypeNode type for the element. See Remarks for full explanation.
chrome 1.3safari 1.3Firefox 1.0ie 5.5opera 8.0
nodevalueValue of the element.
chrome 1.3safari 1.3Firefox 1.0ie 5.0opera 8.0
offsetheightHeight of the element (in pixels).
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
offsetleftNumber of pixels the left edge of the element is offset from the left edge of its parent element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
offsetparentReference to the parent object corresponding with the offsetHeight, offsetWidth, offsetLeft, and offsetTop properties.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
offsettopNumber of pixels the top edge of the element is offset from the top edge of its parent element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
offsetwidthWidth of the element (in pixels).
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
outerhtmlHTML mark-up for an element, including start and end tags and any content between the tags.
chrome 1.3safari 1.3Firefox ??ie 4.0opera 8.0
outertextPlain text for an element, including start and end tags.
chrome 1.3safari 1.3Firefox ??ie 4.0opera 8.0
ownerdocumentReference to the document that contains the element.
chrome 1.0safari 1.0Firefox 1.0ie 6.0opera 7.0
parentnodeReference to the direct parent node of the element, if it exists.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 4.0
prefixPrefix XML name for the element.
chrome 1.0safari 1.0Firefox 1.0ie ??opera 4.0
previoussiblingReference to the previous sibling element of the element, if it exists.
chrome 1.0safari 1.0Firefox 1.0ie 5.0opera 4.0
scrollheightHeight (in pixels) of the total content area of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
scrollleftNumber of pixels between the actual left edge of the element to the displayed left edge of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
scrolltopNumber of pixels between the actual top edge of the element to the displayed top edge of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
scrollwidthWidth (in pixels) of the total content area of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
styleReference to the inline CSS style for the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
tabindexIndicates the tab order index for the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
tagnameHTML tag name for the element.
chrome 1.3safari 1.3Firefox 1.0ie 4.0opera 8.0
titleValue of the title attribute for the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
onblurFires when the element loses focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onclickFires when the element is clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
ondblclickFires when the element is double-clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onfocusFires when the element receives focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeydownFires when a user presses down on a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeypressFires when a user presses a key or holds down the key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeyupFires when a user releases a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousedownFires when a user clicks down on the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousemoveFires when the mouse moves while the pointer over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoutFires when the mouse pointer moves off of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoverFires when the mouse pointer moves over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseupFires when the user releases the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0

Example
No example available.

Examples having uses of: 'htmlelement'