The parser picks an interface for each tag (the prototype chain is drawn in The Interface Hierarchy). Valid custom element names get plain HTMLElement until defined (Defining Custom HTML Elements); unknown names get HTMLUnknownElement.
for (const tag of ['input', 'video', 'user-card', 'blink']) {
console.log(`<${tag}>`.padEnd(12), document.createElement(tag).constructor.name);
}Output
<input> HTMLInputElement <video> HTMLVideoElement <user-card> HTMLElement <blink> HTMLUnknownElement
| Member of HTMLElement | What it does |
|---|---|
| hidden, inert | Hide the element; block focus and clicks inside it |
| dataset | data-user-id becomes dataset.userId |
| innerText | Text as rendered, honoring CSS and hidden content |
| focus(), blur(), click() | Move focus; simulate activation (Simulating Clicks) |
| showPopover(), togglePopover() | Control a popover element (Popover and Dialog in JS) |
innerText can force a reflow (Reflow, Repaint and Batching), so prefer textContent. inert is Baseline widely available since April 2023. Most properties reflect an attribute; value is the exception, holding the live value while defaultValue maps to the attribute.