liveBook · Manning

HTMLElement API

The HTMLElement API is the browser DOM interface defining common properties and behavior for HTML element objects.

How 3 Manning books explain it

Web Components in Action

The HTMLElement API defines the base interface and behavior inherited by HTML elements and custom elements.

How it is used
Uses HTMLElement as the base class for defining autonomous custom elements and building browser-visible Web Components.
How deep it goes
Explains inheritance, registration, lifecycle setup, rendering, events, and compatibility cautions, but defers broader Web Components concepts.
Examples
Demonstrates a photo carousel with title, author, image URLs, navigation buttons, CSS, lifecycle setup, and click handlers.
What you can do after
Build it from scratch: define an HTMLElement subclass, register it safely, render content, and wire interactive behavior.

Read how Web Components in Action explains HTMLElement API →

Web Component Development with Modern Libraries and Tooling

The browser-provided JavaScript base class for HTML elements.

How it is used
Defines the JavaScript foundation for reusable vanilla web components that combine HTML, CSS, and behavior.
How deep it goes
Explains inheritance, lifecycle usage, registration, naming constraints, duplicate checks, and basic browser errors.
Examples
Uses a hello-world greeting component with an optional name attribute, paragraph output, a button, scoped styling, and click behavior.
What you can do after
Build it from scratch by extending HTMLElement, implementing connectedCallback, registering a valid name, and using the resulting custom element.

Read how Web Component Development with Modern Libraries and Tooling explains HTMLElement API →

Vanilla Web

HTMLElement is the base browser interface implemented by most concrete HTML element objects and their shared properties and methods.

How it is used
Updates browser interfaces by reading, changing, adding, moving, or removing DOM elements.
How deep it goes
Defines shared properties, distinguishes specialized subclass APIs, and summarizes traversal through a reference table.
Examples
Demonstrates creating a button, setting its class, dataset, and text, then appending it to the document.
What you can do after
Apply native element properties and methods to inspect, update, and traverse browser interfaces.

Read how Vanilla Web explains HTMLElement API →

Also covered in

What to know first

Related concepts

Questions about HTMLElement API

What is HTMLElement API?

The HTMLElement API is the browser DOM interface defining common properties and behavior for HTML element objects.

Which Manning books explain HTMLElement API?

Web Components in Action, Web Component Development with Modern Libraries and Tooling and Vanilla Web.

What should I know before learning HTMLElement API?

Manning books that teach HTMLElement API usually introduce HTML, JavaScript, button and CSS first.

What kinds of HTMLElement API are there?

Kinds of HTMLElement API include anchor element, autonomous custom element, button, HTMLDivElement and HTMLInputElement.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.