Revision 49250 of HTMLElement

  • Revision slug: DOM/HTMLElement
  • Revision title: HTMLElement
  • Revision id: 49250
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment update per bug 583514; 163 words added

Revision Content

{{ DomRef() }}

HTML element interface

HTMLElement is an abstract interface for the DOM from which all HTML elements inherit.

Properties

Name Type Description
{{ domxref("element.accessKey", "accessKey") }} {{ HTMLVersionInline("5") }} DOMString The access key assigned to the element.
{{ domxref("element.className", "className") }} DOMString The name of the CSS class assigned to the element.
{{ domxref("element.dir", "dir") }} DOMString The element's dir attribute.
{{ domxref("element.id", "id") }} DOMString
The element's ID.
{{ domxref("element.lang", "lang") }} DOMString The element's lang attribute.
{{ domxref("element.title", "title") }} DOMString The element's title.

Methods

Name & Arguments Return Description

{{ domxref("element.blur()", "blur()") }} {{ HTMLVersionInline("5") }}

void Removes keyboard focus from the currently focused element.
{{ domxref("element.click()", "click()") }} {{ HTMLVersionInline("5") }} void Sends a mouse click event to the element.
{{ domxref("element.focus()", "focus()") }} {{ HTMLVersionInline("5") }} void Makes the element the current keyboard focus.

Examples

Specification

See also

  • {{ domxref("Element") }}

Revision Source

<p>{{ DomRef() }}</p>
<h2>HTML element interface</h2>
<p>HTMLElement is an abstract interface for the <a href="/en/DOM" title="en/DOM">DOM</a> from which all HTML elements inherit.</p>
<h2>Properties</h2>
<table class="standard-table"> <thead> <tr> <th scope="col">Name</th> <th scope="col">Type</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>{{ domxref("element.accessKey", "accessKey") }} {{ HTMLVersionInline("5") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a></code></td> <td>The access key assigned to the element.</td> </tr> <tr> <td>{{ domxref("element.className", "className") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a></code></td> <td>The name of the CSS class assigned to the element.</td> </tr> <tr> <td>{{ domxref("element.dir", "dir") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a></code></td> <td>The element's <code>dir</code> attribute.</td> </tr> <tr> <td>{{ domxref("element.id", "id") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a><br> </code></td> <td>The element's ID.</td> </tr> <tr> <td>{{ domxref("element.lang", "lang") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a></code></td> <td>The element's <code>lang</code> attribute.</td> </tr> <tr> <td>{{ domxref("element.title", "title") }}</td> <td><code><a href="/En/DOM/DOMString" title="En/DOM/DOMString">DOMString</a></code></td> <td>The element's title.</td> </tr> </tbody>
</table>
<h2>Methods</h2>
<table class="standard-table"> <thead> <tr> <th scope="col">Name &amp; Arguments</th> <th scope="col">Return</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td> <p>{{ domxref("element.blur()", "blur()") }} {{ HTMLVersionInline("5") }}</p> </td> <td><code>void</code></td> <td>Removes keyboard focus from the currently focused element.</td> </tr> <tr> <td>{{ domxref("element.click()", "click()") }} {{ HTMLVersionInline("5") }}</td> <td><code>void</code></td> <td>Sends a mouse click event to the element.</td> </tr> <tr> <td>{{ domxref("element.focus()", "focus()") }} {{ HTMLVersionInline("5") }}</td> <td><code>void</code></td> <td>Makes the element the current keyboard focus.</td> </tr> </tbody>
</table>
<h2>Examples</h2>
<h2>Specification</h2>
<ul> <li><a class=" external" href="http://www.whatwg.org/specs/web-apps/current-work/#htmlelement" title="http://www.whatwg.org/specs/web-apps/current-work/#htmlelement">HTML5:  HTMLElement interface</a></li>
</ul>
<h2>See also</h2>
<ul> <li>{{ domxref("Element") }}</li>
</ul>
Revert to this revision