The HTMLElement Members

HTMLElement object represents the HTML elements in the document.

NameDescriptionReturns
add(class) Adds the class to the element.void
appendChild(HTMLElement)Appends the specified element as a child of the current element.HTMLElement
attributesReturns the attributes applied to the element.Attr[]
checkedGets or sets the presence of the checked attribute.boolean
classListGets or sets the list of classes.DOMTokenList
classNameGets or sets the list of classes.string
cloneNode(boolean)Copies an element.HTMLElement
compareDocumentPosition(HTMLElement)Determines the relative position of an element.number
contains(class) Returns true if the element belongs to the specified class.boolean
createElement(tag) Creates a new HTMLElement object with the specified tag type.HTMLElement
createTextNode(text)Creates a new Text object with the specified content.Text
datasetReturns the data-* attributes.string[name]
dirGets or sets the dir attribute.string
disabledGets or sets the disabled attribute.boolean
getAttribute(name) Returns the value of the specified attribute.string
hasAttribute(name) Returns true if the element has the specified attribute.boolean
hiddenGets or sets the hidden attribute.boolean
idGets or sets the id.string
innerHTMLGets or sets the element's content.string
insertAdjacentHTML(pos, text) Inserts HTML relative to the element.void
insertBefore(newelem, childElem) Inserts the first element before the second (child) element.HTMLElement
isEqualNode(HTMLElement) Determines whether the specified element is equal to the current element.boolean
isSameNode(HTMLElement)Determines whether the specified element is the same as the current element.boolean
langGets or sets the lang attribute.string
lengthReturns the number of classes to which the element belongs.number
outerHTMLGets or sets an element's HTML and contents.string
remove(class)Removes the class.boid
removeAttribute(name)Removes the specified attribute from the element.void
removeChild(HTMLElement)Removes the specified child of the current element.HTMLElement
replaceChild(HTMLElement, HTMLElement)Replaces a child of the current element.HTMLElement
setAttribute(name, value) Applies an attribute with the specified name and value.void
spellcheckGets or sets the spellcheck attribute.boolean
stylethe style of the elementCSSStyleDeclaration
tabIndexGets or sets the value of the tabindex attribute.number
tagNameReturns the tag name indicating the element type.string
titleGets or sets the title attribute.string
toggle(class)Adds the class if it is not present, and removes it if it is present.boolean
Home 
  JavaScript Book 
    JavaScript Reference  

JavaScript Reference:
  1. Array class
  2. Date class
  3. Math class
  4. Number class
  5. String class
  6. Document
  7. History
  8. The HTMLElement Members
  9. Window
  10. Screen
  11. Navigator
  12. Location
  13. html tag and its cooresponding JavaScript class