CSS Selector [attribute]
Description
The [attribute]
selector selects elements with the specified attribute.
Example
<!DOCTYPE html>
<html>
<head>
<style>
a[target]<!--from w w w . j ava 2s. com-->
{
background-color:red;
}
</style>
</head>
<body>
<a href="http://java2s.com" target="_black">java2s.com</a>
</body>
</html>
The code above generates the following result.