About This HTML Issue
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
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Café menu</title>
</head>
Valid example
<head>
<meta charset="utf-8">
<title>Café menu</title>
</head>
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?
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.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries