Skip to main content
HTML Validation

Bad value “image/png, image/x-icon” for attribute “type” on element “link”: Expected a token character, whitespace or a semicolon but saw “,” instead.

About This HTML Issue

The type attribute on a <link> element must contain a single MIME type, not a comma-separated list of multiple types.

The type attribute specifies the MIME type of the linked resource and only accepts one value. It helps the browser decide whether it can handle the resource before downloading it. If you want to reference a favicon that could be in PNG or ICO format, you should pick the single correct MIME type that matches the actual file you’re linking to.

For .png favicons, use image/png. For .ico favicons, use image/x-icon. If you need to support both formats, use separate <link> elements — one for each file.

Invalid Example

<link rel="icon" type="image/png, image/x-icon" href="/favicon.png">

Valid Examples

If your favicon is a PNG file:

<link rel="icon" type="image/png" href="/favicon.png">

If you want to provide both formats, use two separate <link> elements:

<link rel="icon" type="image/png" href="/favicon.png">
<link rel="icon" type="image/x-icon" href="/favicon.ico">

The browser will select the most appropriate icon from the available options. Most modern browsers prefer PNG, while older browsers will fall back to ICO.

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
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries