HTML Guide
Instead of using the isolang
attribute to define the language of the document, you can use lang
with an ISO 639-1 two character code.
For example, for Portuguese:
<html lang="pt">
Learn more:
Related W3C validator issues
The value en-EN is not a valid language tag for the hreflang attribute on a link element.
The hreflang attribute specifies the language (and optionally, the region) of the linked resource to help search engines and browsers deliver the correct localized version. Language tags should follow BCP 47 standards, with primary language subtags (like en) and optional region subtags (like US). A correct region subtag for English would be en-US (English as used in the United States) or en-GB (United Kingdom). Double language subtags like en-EN are invalid because the region subtag must be a valid country code, not a repeat of the language code.
Correct usage:
<link rel="alternate" href="https://example.com/en/" hreflang="en">
<link rel="alternate" href="https://example.com/en-gb/" hreflang="en-GB">
<link rel="alternate" href="https://example.com/en-us/" hreflang="en-US">
Incorrect usage:
<link rel="alternate" href="https://example.com/en-en/" hreflang="en-EN">
Use en, en-US, or en-GB as appropriate for English-language content, but never en-EN.
The specified language code in the lang attribute of the <html> tag is not a valid ISO code.
Invalid value used for the multiple attribute on an input element.
The multiple attribute is a boolean attribute for certain input types (e.g., email, file). Boolean attributes must appear without a value (or with the same name as value in legacy cases), and they only work on specific types. Valid usage: <input type="email" multiple> or <input type="file" multiple>. Invalid usage includes multiple="1", multiple="true", or using multiple on unsupported types like text or number. The email type allows comma-separated addresses when multiple is present; the file type allows selecting more than one file.
HTML Examples
Example that reproduces the error
<!DOCTYPE html>
<html lang="en">
<head>
<title>Invalid multiple</title>
</head>
<body>
<!-- Invalid: value on boolean attribute, and wrong type -->
<input type="text" name="tags" multiple="1">
</body>
</html>
Corrected example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Valid multiple</title>
</head>
<body>
<!-- Valid: boolean attribute without a value on supported types -->
<input type="email" name="recipients" multiple placeholder="name@example.com, other@example.com">
<input type="file" name="attachments" multiple>
</body>
</html>
Always use a language attribute on the <html> tag to declare the default language of the text in the page, using the lang property.
Example:
<html lang="fr">
HTTP status code 202 means the server has accepted the request but has not completed processing it, so the validator cannot retrieve the resource.
The W3C HTML Validator needs to retrieve external resources (like linked CSS or JS files, images, or even your webpage itself) and expects a successful 200 OK HTTP status code. If it gets a 202 Accepted instead, the resource is not fully available for validation, which prevents it from fetching and checking the content.
Causes:
- Your server is responding with a 202 Accepted and processing in the background instead of serving the full content immediately.
- You might be testing a URL that triggers background processing, a queue, or is incomplete.
- If your resource is an API or dynamic endpoint, make sure to provide a static, direct file with a 200 OK response for validation.
How to fix:
- Configure your server to respond with 200 OK and immediately provide the requested content for HTML documents or resources.
- Avoid validating URLs that return 202 Accepted. Only validate URLs serving complete resources.
The validator is blocked from accessing an external resource such as a stylesheet, script, or image due to a 403 (Forbidden) HTTP status.
This means that the HTML references a resource (often in a link, script, img, or iframe element) at a URL that is denying access—possibly due to server permissions, IP restrictions, or hotlink protection. The validator needs to retrieve these resources to check them, so HTTP 403 errors will prevent validation of external resources.
The “HTTP resource not retrievable” error with an HTTP status code of 404 indicates that the W3C Validator could not find a specific web page by its URL. This error occurs when the URL provided for a page is incorrect, or the page no longer exists at the given address.
The “HTTP resource not retrievable” error with an HTTP status code of 429 indicates that the W3C Validator was temporarily blocked from accessing a specific URL because the remote server is rate-limiting incoming requests. This typically happens when too many requests are made in a short period of time.
To resolve this:
- Try checking the site at a lower speed, or less often.
- If you’re the server owner, check your server or CDN settings for rate-limiting rules that might be too aggressive.
This error is usually temporary. Waiting before retrying can often resolve the issue.
The “HTTP resource not retrievable” error with an HTTP status code of 503 indicates that the W3C Validator could not access a web page referenced in your HTML. This error occurs when the remote server hosting the page is temporarily unavailable or overloaded.
The <!DOCTYPE html public "-//W3C//DTD HTML 4.0 Transitional//EN"> doctype triggers quirks mode in modern browsers and is not compliant with HTML5 standards.
The HTML5 specification requires the use of a simple doctype declaration, which ensures standards mode rendering. The correct doctype is <!DOCTYPE html>, which must appear at the very top of every HTML5 document. Legacy doctypes like HTML 4.0 Transitional are obsolete for modern web development and can cause inconsistent browser behavior.
Example of correct usage:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Valid HTML5 Doctype Example</title>
</head>
<body>
<p>Your content here.</p>
</body>
</html>
Replace any legacy or malformed doctype with the above declaration to conform to current HTML standards.