Mobile app version of vmapp.org
Login or Join
Shelley277

: Should I use the lang attribute when writing words in French? My website is mostly in English but my articles regularly contain words and phrases in French. Here is an example: https://frenchtogether.com/quand-meme/

@Shelley277

Posted in: #Html #LangAttribute #Multilingual #Seo

My website is mostly in English but my articles regularly contain words and phrases in French.

Here is an example: frenchtogether.com/quand-meme/
Should I use the lang attribute for each of these words and phrases? I have never done so and I wonder if it could be hurting me in term of SEO.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley277

2 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

Setting up and using the Lang attribute appropriately will assist with accessibility and better UX through all types of devices. Google said they ignore the Lang attribute for indexation purposes and instead they use hreflang, but that doesn’t mean they evaluate the websites accessibility and UX.

The standard reads


The lang (or sometimes the xml:lang ) attribute specifies the natural language of the content of a web page. An attribute on the html tag sets the language for all the text on the page. If part of the page uses text in a different language, you can add a language attribute with a different value to the element that surrounds that content.


You can define the Lang attribute for he whole page and then define each text different Lang attribute in another language. follow this instruction.

Following those recommendation will help you to have a cleaner HTML code and better overall webpage quality and it might help you with better SEO.

10% popularity Vote Up Vote Down


 

@Nimeshi995

It won't make a difference - Google doesn't take note of it within HTML at all:
www.seroundtable.com/google-ignores-the-html-lang-attribute-22974.html
That said, I'd keep it as a tag in the head of the page. (In your case, it'd be English.) Yes, it's been deprecated by Google, but can help with web standards, particularly for certain other search engines and screen readers.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme