Set the background-color to "pink" for elements with a "target" attribute. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the background-color to "pink" for elements with a "target" attribute.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
a[target] {<!-- www.j a v a 2  s.  c  om-->
    background-color: pink;
}
</style>
</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