CSS [attribute=value] selector
Complete CSS Selector Reference Manual
Example
Select all a elements that use target="_blank"
a[target=_blank]
{
background-color:yellow;
}
Try it »
[attribute=valueThe ] selector is used to select elements with a specified attribute and value. All major browsers support [attribute=value] selector. Note: [attribute=value] To work in IE8, a DOCTYPE must be declared CSS Tutorial: CSS attribute selectors
Browser support





Related Articles
Complete CSS Selector Reference Manual