Namespaced
Examples
Type selectors allow an optional namespace component (namespace prefix). The namespace prefix can be left empty to indicate that the selector is only to match elements with no namespace, or an asterisk can be used to indicate that the selector matches elements in any namespace (as well as elements with no namespace).
@namespace myprfx url(http://www.microsoft.com);
[First, declare the namespace prefix (myprfx
in this example): View live example]
Notes
Remarks
A CSS qualified name is an element or attribute name that is located within a namespace. To form a qualified name, first declare a namespace prefix by using the @namespace at-rule. Then, prepend the namespace prefix to the element or attribute name, separating the prefix and the name with a vertical bar (|). Type, universal, and attribute selectors can be namespaced, as shown in Examples.
Syntax
<strong/>prfx|selector {...}
Parameters
- prfx
- A namespace prefix. The namespace prefix is declared by the @namespace at-rule.
selector - A local element or attribute name.
Standards information
- CSS Namespaces Module, Section 4
See also
Related articles
Selectors
Namespaced
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]