CSS [attribute]Selectors
Complete CSS Selector Reference Manual
Example
Select all <a> elements with a target attribute:
a[target]
{
background-color:yellow;
}
{
background-color:yellow;
}
Try it Yourself »
Browser Support
All major browsers support [attribute] Selector.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support [attribute] selector.
Note: [attribute] To run in IE8, you must declare<!DOCTYPE> .
Related Articles
CSS Tutorial:CSS attribute selector/a>
Complete CSS Selector Reference Manualother extensions