HTML Interface

HTML DOM API interfaces

The majority of the interfaces that comprise the HTML DOM API map almost one-to-one to individual HTML elements, or to a small group of elements with similar functionality. In addition, the HTML DOM API includes a few interfaces and types to support the HTML element interfaces.


HTML element interfaces

These interfaces represent specific HTML elements (or sets of related elements which have the same properties and methods associated with them).

  • HTMLAnchorElement
  • HTMLAreaElement
  • HTMLAudioElement
  • HTMLBaseElement
  • HTMLBodyElement
  • HTMLBRElement
  • HTMLButtonElement
  • HTMLCanvasElement
  • HTMLDataElement
  • HTMLDataListElement
  • HTMLDetailsElement
  • HTMLDialogElement
  • HTMLDirectoryElement
  • HTMLDivElement
  • HTMLDListElement
  • HTMLElement
  • HTMLEmbedElement
  • HTMLFieldSetElement
  • HTMLFormElement
  • HTMLHRElement
  • HTMLHeadElement
  • HTMLHeadingElement
  • HTMLHtmlElement
  • HTMLIFrameElement
  • HTMLImageElement
  • HTMLInputElement
  • HTMLLabelElement
  • HTMLLegendElement
  • HTMLLIElement
  • HTMLLinkElement
  • HTMLMapElement
  • HTMLMediaElement
  • HTMLMenuElement
  • HTMLMetaElement
  • HTMLMeterElement
  • HTMLModElement
  • HTMLObjectElement
  • HTMLOListElement
  • HTMLOptGroupElement
  • HTMLOptionElement
  • HTMLOutputElement
  • HTMLParagraphElement
  • HTMLPictureElement
  • HTMLPreElement
  • HTMLProgressElement
  • HTMLQuoteElement
  • HTMLScriptElement
  • HTMLSelectElement
  • HTMLSlotElement
  • HTMLSourceElement
  • HTMLSpanElement
  • HTMLStyleElement
  • HTMLTableCaptionElement
  • HTMLTableCellElement
  • HTMLTableColElement
  • HTMLTableElement
  • HTMLTableRowElement
  • HTMLTableSectionElement
  • HTMLTemplateElement
  • HTMLTextAreaElement
  • HTMLTimeElement
  • HTMLTitleElement
  • HTMLTrackElement
  • HTMLUListElement
  • HTMLUnknownElement
  • HTMLVideoElement

Deprecated HTML Element Interfaces

  • HTMLMarqueeElement Deprecated

Obsolete HTML Element Interfaces

  • HTMLFontElement Deprecated
  • HTMLFrameElement Deprecated
  • HTMLFrameSetElement Deprecated
  • HTMLIsIndexElement Deprecated
  • HTMLMenuItemElement Deprecated

Web app and browser integration interfaces

These interfaces offer access to the browser window and document that contain the HTML, as well as to the browser's state, available plugins (if any), and various configuration options.

  • BarProp
  • Navigator
  • Window

Deprecated web app and browser integration interfaces

  • External Deprecated

Obsolete web app and browser integration interfaces

  • ApplicationCache Deprecated
  • Plugin Deprecated
  • PluginArray Deprecated

Form support interfaces

These interfaces provide structure and functionality required by the elements used to create and manage forms, including the <form> and <input> elements.

  • FormDataEvent
  • HTMLFormControlsCollection
  • HTMLOptionsCollection
  • RadioNodeList
  • ValidityState

Canvas and image interfaces

These interfaces represent objects used by the Canvas API as well as the <img> element and <picture> elements.

  • CanvasGradient
  • CanvasPattern
  • CanvasRenderingContext2D
  • ImageBitmap
  • ImageBitmapRenderingContext
  • ImageData
  • OffscreenCanvas
  • OffscreenCanvasRenderingContext2D
  • Path2D
  • TextMetrics

Media interfaces

The media interfaces provide HTML access to the contents of the media elements: <audio> and <video>.

  • AudioTrack
  • AudioTrackList
  • MediaError
  • TextTrack
  • TextTrackCue
  • TextTrackCueList
  • TextTrackList
  • TimeRanges
  • TrackEvent
  • VideoTrack
  • VideoTrackList

Drag and drop interfaces

These interfaces are used by the HTML Drag and Drop API to represent individual draggable (or dragged) items, groups of dragged or draggable items, and to handle the drag and drop process.

  • DataTransfer
  • DataTransferItem
  • DataTransferItemList
  • DragEvent

Page history interfaces

The History API interfaces let you access information about the browser's history, as well as to shift the browser's current tab forward and backward through that history.

  • BeforeUnloadEvent
  • HashChangeEvent
  • History
  • Location
  • PageTransitionEvent
  • PopStateEvent

Web Components interfaces

These interfaces are used by the Web Components API to create and manage the available custom elements.

  • CustomElementRegistry

Miscellaneous and supporting interfaces

These supporting object types are used in a variety of ways in the HTML DOM API. In addition, PromiseRejectionEvent represents the event delivered when a JavaScript Promise is rejected.

  • DOMStringList
  • DOMStringMap
  • ErrorEvent
  • HTMLAllCollection
  • MimeType
  • MimeTypeArray
  • PromiseRejectionEvent

Interfaces belonging to other APIs

Several interfaces are technically defined in the HTML specification while actually being part of other APIs.


Web storage interfaces

The Web Storage API provides the ability for websites to store data either temporarily or permanently on the user's device for later re-use.

  • Storage
  • StorageEvent

Web Workers interfaces

These interfaces are used by the Web Workers API both to establish the ability for workers to interact with an app and its content, but also to support messaging between windows or apps.

  • BroadcastChannel
  • DedicatedWorkerGlobalScope
  • MessageChannel
  • MessageEvent
  • MessagePort
  • SharedWorker
  • SharedWorkerGlobalScope
  • Worker
  • WorkerGlobalScope
  • WorkerLocation
  • WorkerNavigator

WebSocket interfaces

These interfaces, defined by the HTML specification, are used by the WebSockets API.

  • CloseEvent
  • WebSocket

Server-sent events interfaces

The EventSource interface represents the source which sent or is sending server-sent events.

  • EventSource