How to specify the language of the element's content in HTML?
Answers
Answered by
0
Hey mate.
Here is your answer.
Always use a language attribute on the html tag to declare the default language of the text in the page. When the page contains content in another language, add a language attribute to an element surrounding that content.
Use the lang attribute for pages served as HTML, and the xml:lang attribute for pages served as XML. For XHTML 1.x and HTML5 polyglot documents, use both together.
Use language tags from the IANA Language Subtag Registry. You can find subtags using the unofficial Language Subtag Lookup tool.
Use nested elements to take care of content and attribute values on the same element that are in different languages.
Hope it helps.
Don't forget to follow.
Similar questions