HTML lang attributes - HTML and XHTML attributes - Guide to HTML, XHTML Guide

Change Font Size: / / Directory List

HTML lang attribute

Lang attributes - a statement on behalf of HTML language

Example

  <html Xmlns "http://www.w3.org/1999/xhtml" lang = = = "en" "en" xml:lang> 
  <html Xmlns "http://www.w3.org/1999/xhtml" lang = = = "zh-CN" "zh-CN" xml:lang> 
  • En definition language is English
  • Zh-CN definition language for the Chinese

Description:

  • If the page is defined as XHTML1.1 or XML format, can be used xml: lang attribute (because xml: lang attribute is defined in the XML standard language usage information).
  • If the web page using HTML format, then they should also use xml: lang and the lang attribute.