I usually use this: <html lang="en">.
However, I am working on a website that will use two languages and mix them up sometimes in the same sentence or heading.
How would the above code look in this case? Can I use <html lang="lang1 lang2">?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I can tell from reading the HTML5 spec the
langattribute:Source: http://www.w3.org/TR/html5/dom.html#the-lang-and-xml:lang-attributes
There’s no mention in the spec of an array of language strings and every example I’ve found uses a single language string.
This makes sense since really a given section can only be in one language unless we’re creating a new hybrid language.
Since the lang attribute is valid on all HTML elements you can wrap your language specific code in a new tag in order to indicate its language.