← All notes

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

Sources

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

Permanent ID: iil:note:jv1w5ws1

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.},
}

Markdown

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.

All artifact files (JSON index)

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.