Friday, May 23, 2014

HTML TUTORIAL PART 62

HTML TUTORIAL PART 62

PROBLEM:
LOOK AT THE FOLLOWING:

The links with a target attribute gets a yellow background:
w3schools.com disney.com wikipedia.org
Note: For [attribute] to work in IE8 and earlier, a DOCTYPE must be declared.


SOLVED:
THE CODE BELOW MADE THE HTML TIP:

<!DOCTYPE html>
<html>
<head>
<style>
a[target]
{
background-color:yellow;
}
</style>
</head>
<body>

<p>The links with a target attribute gets a yellow background:</p>

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

<p><b>Note:</b> For [<i>attribute</i>] to work in IE8 and earlier, a DOCTYPE must be declared.</p>

</body>
</html>

No comments:

Post a Comment