This page is In Progress

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

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