# Bad value “text/html; charset=iso-8859-1” 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-1-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/)

A `meta` element with `http-equiv="Content-Type"` must declare `charset=utf-8` in its `content` attribute, so `text/html; charset=iso-8859-1` is rejected.

The HTML living standard allows a single character encoding for HTML documents: UTF-8. When you declare it with the `http-equiv` form, the `content` attribute must be `text/html; charset=utf-8` (case-insensitive). Any other value after `charset=`, including ISO-8859-1 (also known as Latin-1), fails validation.

ISO-8859-1 is a legacy single-byte encoding for Western European languages. Browsers don't decode it as declared anyway: the WHATWG Encoding Standard maps the `iso-8859-1` label to `windows-1252`, so a page labelled ISO-8859-1 is read as Windows-1252. UTF-8 covers every character in both, plus the rest of Unicode.

Changing the declaration is only half the fix. Save the file itself as UTF-8 too, or accented characters such as `é` or `ñ`, stored as single bytes in a Latin-1 file, show up as replacement characters (`�`). If your server sends a `Content-Type` header with `charset=iso-8859-1`, update it as well, because the HTTP header takes precedence over the `meta` element. When the file is already UTF-8, the validator also reports that the internal encoding declaration disagrees with the actual encoding; correcting the `meta` element clears both errors.

The shorter `<meta charset="utf-8">` does the same job and is the preferred form. Keep it within the first 1024 bytes of the document, usually as the first child of `head`.

## Invalid example

```html
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Café menu</title>
</head>
```

## Valid example

```html
<head>
  <meta charset="utf-8">
  <title>Café menu</title>
</head>
```
