This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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

See also

Related articles

Selectors

Attributions