Define a reusable custom HTML element
Answer: Custom elements let you define new HTML tags and create reusable web components. By defining a custom element, authors inform the parser how to construct an element and how elements of that class should react to changes.
Autonomous and built-in
The HTML Standard explains creating an autonomous custom element, and also a customized built-in element. An autonomous element is a new tag, often with a hyphen in the name. A form-associated custom element is another documented variant. The spec frames custom elements as part of a larger effort to explain platform features through author-exposed extensibility points.
Reusable components
The web.dev article says the API is the foundation of web components. Developers can create new HTML tags, extend existing ones, or extend components other developers have authored. It is a standards-based way to create reusable components using nothing more than the web platform.
| custom elements | kinds | |---|---| | autonomous custom element | A new element class, not an extension of a built-in tag | | customized built-in element | Extends an existing HTML element | | form-associated custom element | Another documented kind of custom element | | web components | Reusable components built on this API |
See also
Claims
- id: C1 claim: Defining a custom element tells the parser how to construct that class of element. source: S1 evidence: "defining a custom element"
- id: C2 claim: The HTML Standard describes creating an autonomous custom element. source: S1 evidence: "Creating an autonomous custom element"
- id: C3 claim: web.dev says custom elements let developers define new HTML tags and create reusable web components. source: S2 evidence: "define new HTML tags, extend existing ones"
Sources
- [S1] Custom elements. WHATWG HTML. https://html.spec.whatwg.org/multipage/custom-elements.html . License: CC-BY-4.0. Accessed 2026-11-19.
- [S2] Custom Elements v1 - Reusable Web Components. web.dev. https://web.dev/articles/custom-elements-v1 . License: CC-BY-4.0. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: WHATWG HTML, Custom elements; web.dev, Custom Elements v1 - Reusable Web Components. CC-BY-4.0; CC-BY-4.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: WHATWG HTML, Custom elements; web.dev, Custom Elements v1 - Reusable Web Components. CC-BY-4.0; CC-BY-4.0.
Cite this
iinventedlight. 2026. "Define a reusable custom HTML element." iinventedlight Library, iil:note:jv1w5ws1, version of 2026-11-19. https://iinventedlight.com/library/notes/html-custom-elements/. License: CC-BY-4.0.
@misc{iil_note_jv1w5ws1,
author = {{iinventedlight}},
title = {{Define a reusable custom HTML element}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/html-custom-elements/},
note = {Permanent ID iil:note:jv1w5ws1. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- html-custom-elements.table.json (table; CC-BY-4.0)
- html-custom-elements.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/html-custom-elements.md.