Skip to main content
HTML Validation

Bad value “” for attribute “is” on element “img”: Must be non-empty.

About This HTML Issue

The is attribute on the <img> element is present but set to an empty string. This attribute names a customized built-in element, so it must hold a valid custom element name and cannot be empty.

A customized built-in element is a standard element with your own behavior added on top. You register one in JavaScript with customElements.define("lazy-image", LazyImage, { extends: "img" }), then write <img is="lazy-image"> to apply it. Custom element names always contain a hyphen. An empty is="" names nothing, so the validator rejects it.

This usually comes from a CMS or template that prints is="" when the variable behind it is blank. If the image is an ordinary <img>, remove the attribute. If it is meant to use a customized built-in element, set the name you registered.

Safari doesn't support customized built-in elements and ignores is, so many projects use an autonomous custom element (a hyphenated tag such as <lazy-image>) instead.

Invalid example

<img is="" src="/images/team.jpg" alt="Our support team at the front desk">

Valid example

Remove is when the image is an ordinary <img>:

<img src="/images/team.jpg" alt="Our support team at the front desk">

Or give it the name of a registered customized built-in element:

<img is="lazy-image" src="/images/team.jpg" alt="Our support team at the front desk">

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries