XHTML xml: lang attribute - HTML and XHTML attributes - Guide to HTML, XHTML Guide

Change Font Size: / / Directory List

XHTML xml: lang attribute

Xml: lang attribute - a statement on behalf of xml language
  • This attribute can be used in any XHTML or XML labels
  • This attribute the GNU I18N norms
  • Value: You can reference standards rfc3066

Example

XHTML documents in English

  <html Xmlns = "en" "http://www.w3.org/1999/xhtml" xml:lang => 

XHTML documents the use of Chinese

  <html Xmlns = "zh-CN" "http://www.w3.org/1999/xhtml" xml:lang => 

XHTML documents, "paragraphs of a" use of Chinese Traditional use of the remaining (Below is pseudo-code)

  <html Xmlns = = "zh-HK" "http://www.w3.org/1999/xhtml" xml:lang> <p xml:lang "zh-CN" => paragraphs 1 </ p> </ html > 

Description:

  • If the page is defined as XHTML1.1 or XML format, then use 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.
  • This attribute commonly used in the html tags, on behalf of the entire document (document) the use of a certain language, can also be used in a XHTML tab.

Xml: lang attribute search engine can understand your use of the language pages, search engines can be classified according to language of the page, or start some automatic translation system. Xml: lang attribute can also understand your publishing tool pages use what language, the corresponding publishing tool that can be switched on punctuation, such as format conversion operation.

Xml: lang attribute is standard Web Design important part of the recall must:).