What are namespaces in HTML (and XML)?
A namespace is an attribute associated with the name of some object, such as a node in an HTML document, that distinguishes the type of object represented by the name from other types of objects with the same name in other namespaces. For example, in
<head><title>Heading Title</title></head>
title
is the name of an element (the title element) in HTML while in
<a href="..." title="link title" ...>
title
is the name of a title attribute on an HTML <a> tag.
The HTML namespaces (plural) in general are the collection of various namespaces in HTML code. The HTML namespace (singular) itself is the one associated with the namespace URI http://www.w3.org/1999/xhtml
.
On this site, the notation <a href>
refers to the href
attribute in the html:a
element namespace, where html:
is the namespace prefix for the HTML namespace.
See the HTML Namespace Tutorial for more information.