Reputation: 3
I am starting a project and I want to know if I can declare more than 1 lang in html??
The idea is to make a landing page in different languages
lang="pt-br, en-us"
Upvotes: 0
Views: 63
Reputation: 40842
If you have multiple languages on that page, you first define the main language of the page on the html
element (<html lang="en-US">
)
And for the elements that have a different language from the page, you add a lang
attribute:
<section lang="pt-BR"> ... </section>
But it would still show all languages on the page. The lang
attribute is just for SEO and accessibility/screenreaders. It won't hide languages.
Upvotes: 1