Closed kailashvele closed 7 years ago
This interests me as I had not previously considered this scenario.
According to this https://webmasters.stackexchange.com/a/5073 google may well prefer the server to send the header rather than relying on meta data.
Furthermore, MDN suggests that specifying the language on <html>
is now the preferred option and the meta tag is obsolete https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
Excuse me whilst I go and double check I've specified the language everywhere...
Hi @kailashvele,
The language for a document should be specified on the html
element:
<!doctype html>
<html lang="en">
<head>
...
</head>
There was a <meta http-equiv="Content-Language" content="en">
declaration that used to belong in the head
. However this meta tag has been deprecated.
Setting the lang
attribute on the html
element, or on content wrapping elements within the body
(if the language is different for a section of content than the language set at the document level), is the appropriate way to declare language these days.
Sure, I considered it should be the part of document as well or we can add this point in the documentation that Lang meta is deprecated you can put it on html. :)
There used to be a section for deprecated tags, but it was becoming more common for people to be making PRs for tags that belonged in the deprecated section, than useful content for the head.
The document was streamlined to only focus on the useful content that belongs in the head of a document, and anything that wasn't considered useful or falls outside of the head wasn't included.
You're right that making people aware of setting an appropriate language is for a document is important. Unfortunately that just falls out of the scope of this project.
Oh Okay, sounds a valid reason :)
Option to specify the language is missing, without that Chrome cannot suggest the full page translation also the content rendering may face some problem or performance problem as browser will have to identify it (maybe).