"Fix errors regarding the language markup of your web page"
Posted: Thu Jun 13, 2019 2:10 pm
Doing SEO checks on pages I got one SEO check that states "Fix errors regarding the language markup of your web page". So it's an English language site. Below is the explanation it gave to fix the error. So I'm supposed to put <html lang = "en"> where in WWB? Does WWB have a pre-defined switch to designate "English" already? I don't want to start putting things in headers if WWB already has something setup for languages.
Rich
How to declare language in HTML. The easiest way to set the language of a page is via the following lang attribute in the HTML element (HTML 5): <html lang = "en"> You should always specify this lang attribute in the HTML element since it is inherited to all other elements as well, and thus also defines the language for text in the head area. This would not be the case if you used the lang attribute in the body element. If parts of the text within a page are written in a different language, the lang attribute should be added to any element that contains such foreign language parts. For pages that are delivered as XML, use the xml: lang attribute. Search engines also understand outdated language information in the meta attributes of a web page such as <meta http-equiv = "content-language" content = "en"> however, these should not be used. To determine the right two-letter language code according to ISO 639-1, you can use the IANA language subtag registry. These codes can also be composed of two parts, the first part referring to the language and the second part referring to the country in which the language is spoken, e.g. "en-us" for American English. If you have problems with declaring the language of your web page via a lang attribute, you can, for example, manually set the geographical orientation of your website for Google using Search Console (> Site Settings).
Rich
How to declare language in HTML. The easiest way to set the language of a page is via the following lang attribute in the HTML element (HTML 5): <html lang = "en"> You should always specify this lang attribute in the HTML element since it is inherited to all other elements as well, and thus also defines the language for text in the head area. This would not be the case if you used the lang attribute in the body element. If parts of the text within a page are written in a different language, the lang attribute should be added to any element that contains such foreign language parts. For pages that are delivered as XML, use the xml: lang attribute. Search engines also understand outdated language information in the meta attributes of a web page such as <meta http-equiv = "content-language" content = "en"> however, these should not be used. To determine the right two-letter language code according to ISO 639-1, you can use the IANA language subtag registry. These codes can also be composed of two parts, the first part referring to the language and the second part referring to the country in which the language is spoken, e.g. "en-us" for American English. If you have problems with declaring the language of your web page via a lang attribute, you can, for example, manually set the geographical orientation of your website for Google using Search Console (> Site Settings).