Help Center

Local Navigation

Object: HTMLElement

The HTMLElement object extends the Element class. It is the parent class of all HTML elements. This object is used to represent those HTML elements which support only core attributes. These include the following elements:

<abbr>, <acronym>, <address>, <b>, <bdo>, <big>, <center>, <cite>, <code>, <dd>, <dfn>, <dt>, <em>, <i>, <kbd>, <noscript>, <s>, <samp>, <small>, <span>, <strike>, <strong>, <sub>, <sup>, <th>, <tt>, <u>, <var>

HTMLElement event handlers

Property name

Type

Description

Status

Availability

onblur

EventListener

Specifies the function to perform when an element loses focus by either the pointer or by tabbed navigation.

writable

4.6 or later

onchange

EventListener

Specifies the function to perform when a form control loses focus after the user has modified the value.

writable

4.6 or later

onclick

EventListener

Specifies the function to perform when the user clicks the trackball or trackwheel on a BlackBerry® device.

writable

4.6 or later

onfocus

EventListener

Specifies the function to perform when an element gains focus by either the pointer or by tabbed navigation.

writable

4.6 or later

onkeydown

EventListener

Specifies the function to perform when a key is pressed down while the pointer is over an element.

writable

4.6 or later

onkeypress

EventListener

Specifies the function to perform when a key is pressed and released while the pointer is over an element.

writable

4.6 or later

onkeyup

EventListener

Specifies the function to perform when a key is released while the pointer is over an element.

writable

4.6 or later

onload

EventListener

Specifies the function to perform when the BlackBerry® Browser finishes loading a new page or a complete frameset.

writable

4.6 or later

onmousedown

EventListener

Specifies the function to perform when the user depresses the trackwheel or trackball on a BlackBerry device.

writable

4.6 or later

onmousemove

EventListener

Specifies the function to perform when the user moves the pointer over an element.

writable

4.6 or later

onmouseout

EventListener

Specifies the function to perform when the user moves the pointer off of an element.

writable

4.6 or later

onmouseover

EventListener

Specifies the function to perform when the user moves the pointer over an element.

writable

4.6 or later

onmouseup

EventListener

Specifies the function to perform when the user releases the trackwheel or trackball on a BlackBerry device.

writable

4.6 or later

onreset

EventListener

Specifies the function to perform when the user resets a form.

writable

4.6 or later

onselect

EventListener

Specifies the function to perform when the user selects some text in a text field.

writable

4.6 or later

onsubmit

EventListener

Specifies the function to perform when the user submits a form.

writable

4.6 or later

onunload

EventListener

Specifies the function to perform when the BlackBerry Browser removes a new page or a frameset.

writable

4.6 or later

HTMLElement properties

Property name

Type

Description

Status

Support level

Availability

className

DOMString

Specifies the class attribute of an element.

writable

DOM 2 HTML

4.6 or later

dir

DOMString

Specifies the dir attribute of an element.

writable

DOM 2 HTML

4.6 or later

id

DOMString

Specifies the id attribute of an element.

writable

DOM 2 HTML

4.6 or later

innerHTML

DOMString

Specifies the string enclosed by the text of the element. Any contained HTML tags will be interpreted as part of the text string, not as HTML.

writable

HTML5

4.6 or later

lang

DOMString

Specifies the lang attribute of an element.

writable

DOM 2 HTML

4.6 or later

style

CSSStyleDeclaration

Returns the contents of the style attribute that defines an inline style for an element.

read only

DOM 2 Style

4.6 or later

title

DOMString

Returns the title attribute of an element.

writable

DOM 2 HTML

4.6 or later

Previous topic: HTMLDocument methods

Was this information helpful? Send us your comments.