Table of contents
HTML element interface
HTMLElement is an abstract interface for the DOM from which all HTML elements inherit.
Properties
| Name | Type | Description |
|---|---|---|
accessKey
HTML5
| DOMString
| The access key assigned to the element. |
accessKeyLabel
HTML5
| DOMString
| A string that represents the element's assigned access key. |
className
| DOMString
| The name of the CSS class assigned to the element. |
dataset
HTML5
| DOMStringMap
| The element's data-* attribute as a map. |
dir
| DOMString
| The element's dir attribute. |
id
| DOMString
| The element's ID. |
lang
| DOMString
| The element's lang attribute. |
title
| DOMString
| The element's title. |
Methods
| Name & Arguments | Return | Description |
|---|---|---|
void | Removes keyboard focus from the currently focused element. | |
click()
HTML5
| void | Sends a mouse click event to the element. |
focus()
HTML5
| void | Makes the element the current keyboard focus. |
Examples
Specification
Browser compatibility
| Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 1.0 (1.7 or earlier) | ? | ? | ? | ? |
accessKey
| 5.0 (5.0) | 17.0 | ? | ? | (Yes)(535.10) |
accessKeyLabel
| 8.0 (8.0) | ? | ? | ? | -- WebKit bug 72715 |
blur()
| 5.0 (5.0) | ? | ? | ? | ? |
click()
| 5.0 (5.0) | ? | ? | ? | (Yes)(535.24) |
dataset
| 6.0 (6.0) | 9.0 | ? | 11.10 | 5.1 |
focus()
| 5.0 (5.0) | ? | ? | ? | ? |
Mozilla Developer Network