4

I see many big sites are not using <html lang="en-US"> or anything similar. Lang is also not available in <Meta> tag. I checked few websites. hub.tutsplus.com and ReadWrite.com are not using any. Few are using as well.

So, I am concerned about:

Is there any effect of Lang attribute on SEO?

Is there any benefits of using lang attribute? I read that Screen Reader and Search Engine can use this. Anything else? What will be the impact of missing lang attribute.

What will be better: <html lang="en-US"> or <html lang="en"> ?

Update: I checked that ReadWrite is using Server header "Content-Language". So, Which is better? Using server side or using lang attribute. From here, I know that lang takes precedence than Meta.

I am an Indian and I just write English (I meant, I cannot say I write US or UK English). In this case, will it be useful to use only lang="en" instead of lang="en-US"?

Does any have impact on performance?

Community
  • 1
  • 1
Satya Prakash
  • 3,372
  • 3
  • 31
  • 47

1 Answers1

2

Is there any effect of Lang attribute on SEO?

At least the W3C says that it is "assisting search engines" in a documentation for @lang in HTML 4.01. That information is most likely still valid.

What will be better: <html lang="en-US"> or <html lang="en"> ?

Both are valid according to BCP 47. Actually it is best practice to avoid language subtags unless they really provide useful information for applications that read or display the content. For example it might be, that the regional variants of certain languages recommend the use of different glyps when they are displayed. In that case it would be helpful to tell the application, which regional variant it is facing.

I am an Indian and I just write English (I meant, I cannot say I write US or UK English). In this case, will it be useful to use only lang="en" instead of lang="en-US"?

In your case it is certainly better to use lang="en".

I checked that ReadWrite is using Server header "Content-Language". So, Which is better?

The usage of lang="en" as an attribute to <html> is recommended, if the content really is in English. If you are not so sure about the language of the site's content and merely want to specify the language of your intended audiance, you might rather use a declaration in the HTTP header.

By the way, the W3C has a interesting article on Internationalization Best Practices, on which my answer is based.

Manuel Batsching
  • 3,406
  • 14
  • 20
  • "If you are not so sure about the language of the site's content .... HTTP header" is looking doubtful. But I am ready to accept your answer. Waiting for more input, if any. – Satya Prakash Oct 13 '13 at 10:44
  • I probably didn't make that point very clear. I am referring to paragraph 4.2 of the resource that I mentioned above. It says: "_If you want to provide metadata about the language of the document's intended audience, you should use one or more of the other mechanisms described in the previous section, ie. not attributes._" Providing the language information in the HTTP header is one of these mechanisms. – Manuel Batsching Oct 13 '13 at 11:02
  • I will leave that point and go with all other goodies. Thanks. – Satya Prakash Oct 13 '13 at 17:53
  • I personally think that language codes should be avoided as they are confusing. English is not just a language but different countries have different currency, date, and number formats. Unless you are planning to build a site that includes only text, it is a better idea to include the country code. – Nicolas Bouvrette Feb 25 '21 at 00:28