HTMLElement Interface

 

ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.


If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)


PDF mobile

HTMLElement Interface

All of the HTML elements implement either this interface, to expose the core HTML attributes and methods, or one of its subinterfaces for elements that need to provide access to additional attributes or methods.

Superinterface:
Element
Subinterfaces:
HTMLAnchorElement HTMLAreaElement HTMLBaseElement HTMLBodyElement HTMLBRElement HTMLButtonElement HTMLCanvasElement HTMLCommandElement HTMLDataListElement HTMLDetailsElement HTMLDivElement HTMLDListElement HTMLEmbedElement HTMLFieldSetElement HTMLFormElement HTMLHeadElement HTMLHeadingElement HTMLHRElement HTMLHtmlElement HTMLIFrameElement HTMLImageElement HTMLInputElement HTMLKeygenElement HTMLLabelElement HTMLLegendElement HTMLLIElement HTMLLinkElement HTMLMapElement HTMLMediaElement HTMLMenuElement HTMLMetaElement HTMLMeterElement HTMLModElement HTMLObjectElement HTMLOListElement HTMLOptGroupElement HTMLOptionElement HTMLOutputElement HTMLParagraphElement HTMLParamElement HTMLPreElement HTMLProgressElement HTMLQuoteElement HTMLScriptElement HTMLSelectElement HTMLSourceElement HTMLSpanElement HTMLStyleElement HTMLTableElement HTMLTableCaptionElement HTMLTableCellElement HTMLTableColElement HTMLTableSectionElement HTMLTextAreaElement HTMLTimeElement HTMLTitleElement HTMLTableRowElement HTMLTrackElement HTMLUListElement
Use:
abbr Element address Element article Element aside Element b Element bdi Element bdo Element cite Element code Element dd Element device Element dfn Element dt Element em Element figcaption Element figure Element footer Element header Element hgroup Element i Element kbd Element mark Element nav Element noscript Element q Element rp Element rt Element ruby Element s Element samp Element section Element small Element strong Element sub Element summary Element sup Element var Element wbr Element
DOM PropertiesSupported
get or setDOMString
element.accessKey
element.accessKey = value
get onlyDOMString
element.accessKeyLabel
get onlyboolean
element.checked
get or setDOMString
element.className
element.className = value
get onlyDOMTokenList
element.classList
get onlyDOMString
element.commandType
get or setDOMString
element.contentEditable
element.contentEditable = value
get or setHTMLMenuElement
element.contextMenu
element.contextMenu = value
get onlyDOMStringMap
element.dataset
get or setDOMString
element.dir
element.dir = value
get onlyboolean
element.disabled
get or setboolean
element.draggable
element.draggable = value
get or setDOMSettableTokenList
element.dropzone
element.dropzone = value
get or setboolean
element.hidden
element.hidden = value
get onlyDOMString
element.icon
get or setDOMString
element.id
element.id = value
get or setDOMString
element.innerHTML
element.innerHTML = value
get onlyboolean
element.isContentEditable
get or setDOMString
element.itemId
element.itemId = value
get onlyDOMSettableTokenList
element.itemProp
get onlyDOMSettableTokenList
element.itemRef
get or setboolean
element.itemScope
element.itemScope = value
get or setDOMString
element.itemType
element.itemType = value
get or setany
element.itemValue
element.itemValue = value
get onlyDOMString
element.label
get or setDOMString
element.lang
element.lang = value
get or setDOMString
element.outerHTML
element.outerHTML = value
get onlyHTMLPropertiesCollection
element.properties
For a microdata item, the properties property is an HTMLPropertiesCollection with all of the elements that contribute properties to this element's microdata model. If the element does not have a itemscope attribute, the element does not represent a microdata item and the collection will be empty.
get or setboolean
element.spellcheck
element.spellcheck = value
get onlyCSSStyleDeclaration
element.style
get or setlong
element.tabIndex
element.tabIndex = value
get or setDOMString
element.title
element.title = value
DOM Interface MethodsSupported
void
element.blur()
void
element.click()
void
element.focus()
NodeList
element.getElementsByClassName(DOMString classNames)
Parameters:
-
Returns:
void
element.insertAdjacentHTML(DOMString position, DOMString text)
Parameters:
-
DOM Events
Event TypePropertySupported
abortFunctiononabort
blurFunctiononblur
canplayFunctiononcanplay
canplaythroughFunctiononcanplaythrough
changeFunctiononchange
clickFunctiononclick
contextmenuFunctiononcontextmenu
cuechangeFunctiononcuechange
dblclickFunctionondblclick
dragFunctionondrag
dragendFunctionondragend
dragenterFunctionondragenter
dragleaveFunctionondragleave
dragoverFunctionondragover
dragstartFunctionondragstart
dropFunctionondrop
durationchangeFunctionondurationchange
emptiedFunctiononemptied
endedFunctiononended
errorFunctiononerror
focusFunctiononfocus
formchangeFunctiononformchange
forminputFunctiononforminput
inputFunctiononinput
invalidFunctiononinvalid
keydownFunctiononkeydown
keypressFunctiononkeypress
keyupFunctiononkeyup
loadFunctiononload
loadeddataFunctiononloadeddata
loadedmetadataFunctiononloadedmetadata
loadstartFunctiononloadstart
mousedownFunctiononmousedown
mousemoveFunctiononmousemove
mouseoutFunctiononmouseout
mouseoverFunctiononmouseover
mouseupFunctiononmouseup
mousewheelFunctiononmousewheel
pauseFunctiononpause
playFunctiononplay
playingFunctiononplaying
progressFunctiononprogress
ratechangeFunctiononratechange
readystatechangeFunctiononreadystatechange
resetFunctiononreset
scrollFunctiononscroll
seekedFunctiononseeked
seekingFunctiononseeking
selectFunctiononselect
showFunctiononshow
stalledFunctiononstalled
submitFunctiononsubmit
suspendFunctiononsuspend
timeupdateFunctionontimeupdate
volumechangeFunctiononvolumechange
waitingFunctiononwaiting

Valid HTML 5