5

I'm getting this error when I validate my HTML using the W3C validator:

Bad value language for attribute name on element meta: Keyword language is not registered.

<meta name="language" content="en" />

How can I solve this?

2

3 Answers 3

16

Use

<html lang="en">

Source

3

You should specify the language on the HTML tag, like so:

<html lang="en">

You can also ues the lang attribute on any element, so if you have just one div with French in it, you could do:

<html lang="en">
    ...
    <body>
        ...
        <div lang="fr"></div>
        ...
    </body>
</html>
0

I think you're looking for content-language

<meta http-equiv="Content-Language" content="en" />
4
  • I used that. Now i'm getting error as: Using the meta element to specify the document-wide default language is obsolete. Consider specifying the language on the root element instead. <meta http-equiv="content-language" content="en" />
    – user1999828
    Apr 12, 2013 at 11:17
  • In this case you have to use <html lang="en"> as already replied by several other persons.
    – Chris
    Apr 12, 2013 at 11:18
  • @Veena: see @AshBurlaczenko's answer Apr 12, 2013 at 11:18
  • Bad value Content-Language for attribute name on element meta: Keyword content-language is not registered. The Content-Language value for an http-equiv attribute on a meta element should no longer be used. You should use a language attribute on the html tag to declare the default language of the actual text in the page. Sep 6, 2014 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.