11

Lots of web sites uses following meta tag to specify the default language of the document:

<meta http-equiv="content-language" content="es-ES">

When I go to W3C site and read about HTML language mark up I get this:

Using the meta element to specify the document-wide default language is obsolete. Consider specifying the language on the root element instead.

What is the way of specifying document language now?

Simon Hayter
  • 33,097
  • 7
  • 60
  • 119
tugberk
  • 787
  • 3
  • 8
  • 18

3 Answers3

4

It belongs ion the <html> tag:

<html lang="en">
John Conde
  • 86,484
  • 28
  • 150
  • 244
2

The full answer to the question is answered by the W3C here: http://www.w3.org/International/questions/qa-http-and-lang.en

@John Conde is correct that it should be included as part of the <html> tag, but there's also the important consideration of ensuring that it's included as part of the HTTP Headers.

Most Meta elements are redundant replacements or over-rides for information that should be sent as part of the HTTP request and response.

Mike Hudson
  • 5,504
  • 25
  • 30
2

<meta http-equiv="content-language" content="ll-cc"> what is this

John Conde is correct that it should be included as part of the tag, but there's also the important consideration of ensuring that it's included as part of the HTTP Headers.

Most Meta elements are redundant replacements or over-rides for information that should be sent as part of the HTTP request and response.

paulmorriss
  • 15,402
  • 1
  • 40
  • 59