Forum Moderators: phranque
Recommended Action:
Use <meta http-equiv="content-language" content="ll-cc"> tag in the <head> section of your page, where "ll-cc" stands for the culture code of the language and country/region the content applies to. Alternatively use the lang="ll-cc" attribute on either the <html> or the <title> tag .
SEO Explanation:
The Meta Language information is used as a hint to help us understand the intended language and country/region the page content applies to. This can help if your site is not hosted in the country/region. Use the “content-language” meta tag to embed the culture code in the <head> section of your page. For example, <meta http-equiv="content-language" content="en-gb"> indicates that the page is in English and intended for the the United Kingdom. Alternatively, you can use <html lang="en-gb"> or <title lang="en-gb">.
What if instead of putting it in the <html> tag you were to put it in the <title> tag?
This is probably a dumb question but I'm feeling dumb.
Does not the following by it's definition and implication mean that it's English?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
would your example pass Section 508
<!DOCTYPE html>
<html lang="en-CA">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Language Specified in Root Element</title>
</head>
<body>
i18n testing of language specification
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="en-CA">
<title>Language Specified in Meta Content-Language</title>
</head>
<body>
i18n testing of language specification
</body>
</html>
<!DOCTYPE html>
<html lang="en-CA">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="en-CA">
<title>Language Specified in Meta Content-Language</title>
</head>
<body>
i18n testing of language specification
</body>
</html>
<!DOCTYPE html>
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="language" content="en-CA">
<head>
<title>Language Specified in Meta Language</title>
</head>
<body>
i18n testing of language specification
</body>
</html>
There is no language attribute in the html tag.
<html>
A language attribute on the html tag sets the default natural language for the page. This information can be used for processing the content in various ways, including such things as spell-checking, accessibility, data formatting, and choice of styles for rendering the page. Every page should have the correct default language specified.
For HTML files, this should be a lang attribute. For XHTML served as HTML you should use both the lang and xml:lang attributes. For files served as XML only, you should have xml:lang, but you don't need to have the lang attribute.
This page uses a meta element with the http-equiv attribute value set to Content-Language.
<meta http-equiv="content-language" content="en-CA"/>
The HTML5 specification has made this type of meta element obsolete in HTML, so you should not use it for pages written in HTML5. This is due to the widespread confusion surrounding the use of this construct. In addition, browsers are inconsistent in the way they handle this information.
Given this, it is strongly recommended that you not use this Content-Language meta element in any HTML format.
This page uses the following character encoding declaration with an http-equiv attribute:
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
This is acceptable for HTML5, however you may want to consider using the meta element with a charset attribute instead. For example:
<meta charset="utf-8">
Keep in mind that Google ignores all code-level language information, from "lang" attributes to Document Type Definitions (DTD). Some web editing programs create these attributes automatically, and therefore they aren't very reliable when trying to determine the language of a webpage.
The request returned code: HTTP/1.1 403 Forbidden