HTML reference

is

The is attribute is used with customized built-in elements: a standard HTML element keeps its native semantics while JavaScript adds custom behavior.

What you will learn

  • What is means for customized built-in elements
  • Why native semantics and keyboard behavior matter
  • Why support testing and a fallback are important

Conceptual example

<button is="fancy-button" type="button">
  Save
</button>

JavaScript can define a custom element named fancy-button that extends the built-in HTMLButtonElement. The original button semantics should remain intact.

What to preserve

Compatibility and design

Customized built-in elements have uneven support across browsers and environments. Check current compatibility data for your audience before relying on is, and provide a progressive-enhancement or simpler fallback when the custom behavior is unavailable.

Related pages