# Bad value “text/html; charset=iso-8859-15” for attribute “content” on element “meta”: “charset=” must be followed by “utf-8”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-text-html-charset-iso-8859-15-for-attribute-content-on-element-meta-charset-must-be-followed-by-utf-8
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `meta` element's `charset` declaration must specify `utf-8` when using HTML5. Values like `iso-8859-15` are not valid in the HTML living standard.

In HTML5, the only permitted character encoding declared via a `meta` element is UTF-8. This applies to both the shorthand form (`<meta charset="utf-8">`) and the longer `http-equiv` form (`<meta http-equiv="Content-Type" content="text/html; charset=utf-8">`). Older encodings like `iso-8859-15`, `windows-1252`, or `iso-8859-1` are not allowed.

The WHATWG HTML standard requires documents to be encoded in UTF-8. If a document uses a legacy encoding, the validator rejects it because the specification explicitly states that the `charset` value must be `utf-8` (case-insensitive).

The shorthand `<meta charset="utf-8">` is the preferred form in HTML5. It is shorter and does exactly the same thing as the `http-equiv` variant. There is no need to use both.

When switching from a legacy encoding, make sure the file itself is actually saved as UTF-8. Declaring UTF-8 in the markup while the file is saved in a different encoding will cause garbled characters. Most modern text editors let you choose the encoding when saving.

## Examples

### Invalid

```html
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
```

### Valid

```html
<meta charset="utf-8">
```
