CSS [attribute] selector
Complete CSS Selector Reference Manual
Example
Select all elements with a target attribute element:
a[target]
{
background-color:yellow;
}
Try it »
Browser support
All major browsers support [attribute] selector.
Browser support





All major browsers support [attribute] selector.
Note: [attribute] To work in IE8, a DOCTYPE must be declared .
Related Articles
CSS Tutorial: CSS attribute selector /a>
Complete CSS Selector Reference Manual