English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Represents elements that have an attribute named 'attribute' with a value of 'value'.
Complete CSS Selector Reference Manual
Select all a elements using target="_blank"
!DOCTYPE html <html> <title>Basic Tutorial Website(oldtoolbag.com)</title> <head> <style> a[target=_blank] { background-color:blue; color:#ffffff; } </style> </head> <body> <p>Links with the target attribute will be filled with a blue background:</p> <a href="//www.oldtoolbag.com">oldtoolbag.com</a> <a href="//www.baidu.com" target="_blank">baidu.com</a> <a href="//www.pcjson.com" target="_top">pcjson.com</a> <p><b>Attention</b> To make[<i> attribute </i>] in IE8and earlier versions must declare DOCTYPE.</ p> </body> </html>Test to see ‹/›
[attribute=value] selector is used to select elements that have specified attributes and values.
IEFirefoxOperaChromeSafari
All major browsers support[attribute=value] selector.
Note: [attribute=value] in IE8must be declared to run in <!DOCTYPE>
CSS Tutorial: CSS Attribute Selector