As the other posters and the W3C have pointed out, you cannot specify more than one language in the lang
attribute of the html
tag.
However, as shown in this answer to "What attribute value should I use for a mixed language page?", you can markup different parts of a page with elements such as div
and span
tags to indicate different languages (or references to other languages) used on the page.
Also, you can create metadata that describes multiple languages for the intended audience of a page, rather than the language of a specific range of text. You do so by getting the server to send the information in the HTTP Content-Language
header. If your intended audience speaks more than one language, the HTTP header allows you to use a comma-separated list of languages. The following is an example of an HTTP header that declares the resource to be a mixture of English, Hindi and Punjabi from the W3C's article Declaring language in HTML:
Content-Language: en, hi, pa
Note: you should always use a language attribute on the html
tag. The language attribute always overrides the HTTP header information. The HTTP header should be used only to provide metadata about the intended audience of the document as a whole, and the language attribute on the html
tag should be used to declare the default language of the content as in a multilingual audience.
For details on this last technique, see HTTP headers, meta
elements and language information. For general language declarations and markup, see Declaring language in HTML.
mul
and empty value. – Terricolous