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 specified language code in the lang attribute of the <html> tag is not a valid ISO code.
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">
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 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.
A stray start tag <html> has been found in the document. As this tag defines the start of the whole HTML document, it should appear only once.
In HTML5, there’s no need to specify the version attribute - it is now obsolete. Here’s an example minimal HTML document to start with:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
Based on the content of the document, the W3C Validator has determined that it’s written in Arabic, and it suggests you specify the direction of text from right to left like this:
<html dir="rtl" lang="ar">
Based on the content of the document, the W3C validator thinks that it’s written in English. Consider explicitly specifying the language using the lang property.
Example:
<html lang="en">
Based on the content of the document, the W3C validator thinks that it’s written in English, but the lang property in the <html> element specifies a different language. Check the language of the document, if it matches the lang property you can safely ignore and mute this warning.
Example:
<html lang="fr">
Based on the content of the document, the W3C validator has determined that the main language doesn’t match the one specified in the lang property of the <html> tag. Check the language of the document, if it matches the lang property you can safely ignore and mute this warning.