# class HTMLElement

###

Module | khtml
Namespace | DOM
Class | HTMLElement
Inherits | DOM::Element

All HTML element interfaces derive from this class. Elements that only expose the HTML core attributes are represented by the base HTMLElement interface. These elements are as follows:

- HEAD

- special: `SUB, SUP, SPAN, BDO`

- font: `TT, I, B, U, S, STRIKE, BIG, SMALL`

- phrase: `EM, STRONG, DFN, CODE, SAMP, KBD, VAR,`
CITE, ACRONYM, ABBR

- list: `DD, DT`

- `NOFRAMES, NOSCRIPT`

- `ADDRESS, CENTER`

Note: The style attribute for this interface is reserved for future usage.

### methods

- HTMLElement ( )

  returns ctor

- HTMLElement (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | DOM.HTMLElement |

- HTMLElement (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | DOM.Node |

- HTMLElement (impl)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  impl | HTMLElementImpl |

- addCSSProperty (property, value)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  property | DOM.DOMString |
  value | DOM.DOMString |

- all ( )

  returns DOM.HTMLCollection

  Retrieves a collection of all nodes that descend from this node. IE-specific extension.

- assignOther (other, elementId)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  other | DOM.Node |
  elementId | int |

- children ( )

  returns DOM.HTMLCollection

  Retrieves a collection of nodes that are direct descendants of this node. IE-specific extension.

- className ( )

  returns DOM.DOMString

  The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.0.

- contentEditable ( )

  returns DOM.DOMString
  KDE 4.1.0 and later only

  Returns the kind of editability that applies to this element.

  The returned string is one of:

- true: This element has been set to be editable.
- false: This element has been set not to be editable.
- inherit: This element inherits its editability from the parent.

This function is not part of the DOM specifications as defined by the w3c.

- dir ( )

  returns DOM.DOMString

  Specifies the base direction of directionally neutral text and the directionality of tables. See the dir attribute definition in HTML 4.0.

- id ( )

  returns DOM.DOMString

  The element's identifier. See the id attribute definition in HTML 4.0.

- innerHTML ( )

  returns DOM.DOMString

  The HTML code contained in this element. This function is not part of the DOM specifications as defined by the w3c.

- innerText ( )

  returns DOM.DOMString

  The text contained in this element. This function is not part of the DOM specifications as defined by the w3c.

- isContentEditable ( )

  returns bool
  KDE 4.1.0 and later only

  Returns whether this element is editable.

  This function is not part of the DOM specifications as defined by the w3c.

- lang ( )

  returns DOM.DOMString

  Language code defined in RFC 1766. See the lang attribute definition in HTML 4.0.

- removeCSSProperty (property)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  property | DOM.DOMString |

- setClassName (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see className

- setContentEditable (enabled)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  enabled | DOM.DOMString |

  Sets the editability of this element.

  This function is not part of the DOM specifications as defined by the w3c.

  enabled - may be one of:

- true: make element editable
- false: make element not editable
- inherit: make element inherit editability from parent.

- setDir (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see dir

- setId (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see id

- setInnerHTML (html)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  html | DOM.DOMString |

  Set the HTML content of this node.

  DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow children.

- setInnerText (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | DOM.DOMString |

  Set the text content of this node.

  DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow children.

- setLang (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see lang

- setTitle (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see title

- title ( )

  returns DOM.DOMString

  The element's advisory title. See the title attribute definition in HTML 4.0.