Set the background-color to "pink" for elements with an attribute like: target="_blank" - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the background-color to "pink" for elements with an attribute like: target="_blank"

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
a[target="_blank"] {
    background-color: pink;
}
</style><!--   w  w w.  j a v a  2s . c o  m-->
</head>
<body>

<a href="http://java2s.com">java2s.com</a>
<a href="http://www.disney.com" target="_blank">disney.com</a>
<a href="http://www.wikipedia.org" target="_top">wikipedia.org</a>

</body>
</html>

Related Tutorials