CSS [attribute | = value] Selector
CSS selectors complete reference manual
Examples
Select a lang attribute start value = "en" all elements
[lang|=en]
{
background-color:yellow;
}
{
background-color:yellow;
}
try it"
Definition and Usage
[Attribute| = value] selector is used to select an element with the specified attribute of the specified value at the start.
Note: This value is the whole word, either alone like lang = "en", or, as a hyphen (-) connections such as lang = "en-us" can be.
Browser Support
All major browsers support[attribute| = value] selector.
Note: [attribute | = value] run in IE8, you must declare <DOCTYPE!>
related articles
CSS tutorial: CSS attribute selectors
More examples
Examples
Choose a class attribute start value = "top" of all the elements:
[Class | = top]
{
background-color: yellow;
}
{
background-color: yellow;
}
try it"
CSS selectors complete reference manual