Website construction with Web standards for 2nd days: What is namespace

Source: Internet
Author: User
Tags xmlns
Source: webpage designer author: A Jie
After DOCTYPE is declared, the following code is: This "xmlns" is short for XHTML namespace and is called the "namespace" declaration. What is the role of namespace? Alibaba Cloud understands that:
Because xml allows you to define your own identifiers, the identifiers you define may be the same as those defined by others, but they indicate different meanings. Errors may occur when files are exchanged or shared. To avoid such errors, XML uses namespace declarations, allowing you to identify your identity through a URL. For example:
John and John both define a <book> identifier, if John's namespace is "http://www.xiaowang.com" and Lee's namespace is "http://www.xiaoli.com", then when two documents exchange data, the <book> identifier is not obfuscated because it belongs to different namespaces.
The more common explanation is that namespace is to mark the document and tell others who the document belongs. But this "who" is replaced by a URL.
XHTML is the identifier language for the transition from HTML to XML. It must comply with XML document rules, so you also need to define the namespace. Because XHTML1.0 cannot customize the identity, so its namespace is the same, is "http://www.w3.org/1999/xhtml ". It doesn't matter if you don't quite understand it. At present, we only need to copy the code.
The following lang = "gb2312" specifies that your document is in simplified Chinese.
This "xmlns" is short for XHTML namespace and is called the "namespace" declaration. What is the role of namespace? Alibaba Cloud understands that:
Because xml allows you to define your own identifiers, the identifiers you define may be the same as those defined by others, but they indicate different meanings. Errors may occur when files are exchanged or shared. To avoid such errors, XML uses namespace declarations, allowing you to identify your identity through a URL. For example:
John and John both define a <book> identifier, if John's namespace is "http://www.xiaowang.com" and Lee's namespace is "http://www.xiaoli.com", then when two documents exchange data, the <book> identifier is not obfuscated because it belongs to different namespaces.
The more common explanation is that namespace is to mark the document and tell others who the document belongs. But this "who" is replaced by a URL.
XHTML is the identifier language for the transition from HTML to XML. It must comply with XML document rules, so you also need to define the namespace. Because XHTML1.0 cannot customize the identity, so its namespace is the same, is "http://www.w3.org/1999/xhtml ". It doesn't matter if you don't quite understand it. At present, we only need to copy the code.
The following lang = "gb2312" specifies that your document is in simplified Chinese.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.