HTML is Attribute

Beginner
6 min read
Updated: Nov 2026
3 examples
Live preview

Definition and Usage

The is global attribute specifies a customized built-in element name. Instead of inventing a new tag, you extend a native element (like button or p) and write <button is="fancy-button">.

Register with customElements.define("fancy-button", Class, { extends: "button" }). Prefer autonomous custom elements (<fancy-button>) when broad Safari support matters.

Keeps native behavior.

Forms, focus, and built-in accessibility often come for free because the tag stays native.

Safari gap.

Customized built-ins are not reliably available in Safari. Feature-detect or ship an autonomous fallback.

HTML Syntax

syntax.html
<built-in is ="custom-name">

custom-name must match a definition that used { extends: "built-in" }.

Attribute Values

ValueDescriptionTry it
custom-nameCustomized built-in registered with matching extendsTry it
with extends: buttonUpgrade a native buttonTry it
progressive enhancementWorks as plain built-in until definedTry it

Live Preview

A <button is="cool-button"> that counts clicks when customized built-ins are supported.

Unsupported browsers still show a normal button.

Result

checking support…

HTML Examples

Example 1 — Customized Button Markup

Keep the native button tag and add is.

HTML
<button type="button" is="cool-button">Save</button>
Try It Yourself

How It Works

  1. Use the built-in tag you are extending.
  2. Set is to the registered custom name.
  3. Native attributes like type still apply.
  4. Upgrade happens after customElements.define.

Example 2 — Register with extends

The third argument ties the custom name to a built-in.

HTML
class CoolButton extends HTMLButtonElement {
  connectedCallback() {
    this.addEventListener("click", () => {
      this.textContent = "Clicked!";
    });
  }
}
customElements.define("cool-button", CoolButton, { extends: "button" });
Try It Yourself

How It Works

  1. Extend the interface (e.g. HTMLButtonElement).
  2. Pass { extends: "button" } to define.
  3. Name must include a hyphen like other custom elements.
  4. Mismatch of extends/tag prevents upgrading.

Example 3 — Progressive Enhancement

Without JS, the control is still a normal button.

HTML
<button type="submit" is="save-button">Save</button>
<!-- Works as submit even before the class loads -->
Try It Yourself

How It Works

  1. Native fallback is the built-in element.
  2. Custom behavior appears after definition.
  3. Great for forms that must submit without JS.
  4. Still check Safari before relying on upgrades.

Edge Cases & Pitfalls

Most production issues are support and registration mismatches.

safari

Safari support is weak

Plan autonomous custom elements or polyfills if Safari is required.

extends

Tag must match extends

button is="x" only upgrades definitions with extends: "button".

name

Custom names need a hyphen

cool-button is valid; coolbutton is not.

create

document.createElement needs the is option

createElement("button", { is: "cool-button" }) when creating from script.

Browser Support

is is an HTML attribute for browsers. It is not a Node.js, Deno, or Bun API.

✓ Partial · Chromium / Firefox

is

Customized built-ins (is + extends) work in Chromium and Firefox. Safari support is missing or limited — feature-detect.

75% Global support (approx.)
Google Chrome 67+
Full support
Mozilla Firefox 63+
Full support
Apple Safari No / limited
Not supported
Microsoft Edge 79+
Full support
Opera 54+
Full support
Samsung Internet 9+
Full support
Internet Explorer No support
Not supported
is Chromium & Firefox

Bottom line: Prefer autonomous custom elements when you need Safari. Use is when native built-in behavior is essential and you can enhance progressively.

Key Takeaways

  • Role: mark a native tag as a customized built-in.
  • Register with { extends: "tagName" } in customElements.define.
  • Keep native semantics of the built-in element.
  • Safari caveat: extends/is support is limited — plan a fallback.

One line: is upgrades a native element into a customized built-in registered with extends.

Frequently Asked Questions

It names a customized built-in element: a custom element that extends a native HTML tag (for example a specialized button) instead of inventing a new tag name.
customElements.define("fancy-button", FancyButton, { extends: "button" }) then use <button is="fancy-button">.
Autonomous elements use a new tag like <fancy-button>. Customized built-ins keep the native tag and add is="...".
Safari historically lacked extends/is support. Prefer autonomous custom elements or progressive enhancement when Safari matters.
The markup is valid, but behavior only appears after the custom element is defined.
New tags (autonomous) are more widely supported. Use is when you specifically need native semantics/form behavior of the built-in.

Next: ismap

Learn the ismap attribute for server-side image maps.

ismap tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful