Day 2: What is a name space?

xiaoxiao2021-03-06  77

After DOCTYPE declares, the next code is:

Usually our HTML4.0 code is just , what is "XMLns" here?

This "xmlns" is an abbreviation of XHTML Namespace called "Name Space" declaration. What is the role of name space? Abie's understanding is:

Since XML allows you to define your own identity, your defined identity and other people defined the same identity, but represents different meaning. Errors are easily generated when file exchange or sharing. In order to avoid this error, XML uses a namespace declaration, allowing you to identify your identity through a URL. E.g:

Xiao Wang and Xiao Li defined a logo, if the namespace of Xiao Wang is "http://www.xiaowang.com", Xiao Li's namespace is "http://www.xiaoli.com" Then, when two documents exchange data, it will not confuse the ID because it belongs to different namespaces.

More popular explanations are: The namespace is a tag to document, tell others, this document is who is. Only this "who" has used a website instead.

XHTML is an identifier language of HTML to the XML transition, which needs to meet the XML document rules, so you need to define the namespace. Also because XHTML1.0 cannot be customized, it is the same space, which is "http://www.w3.org/1999/xhtml". If you still don't understand, don't matter, we can use the code at present.

LANG = "GB2312", specify your document Simplified Chinese.

转载请注明原文地址:https://www.9cbs.com/read-92897.html

New Post(0)