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><!--from w ww  .j a va2  s.c om-->
</head>
<body>

<a href="http://book2s.com">book2s.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