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

> Canonical HTML version: https://rocketvalidator.com/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
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

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

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

## Valid Examples

If your favicon is a PNG file:

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

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

```html
<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.
