Friday, May 23, 2014

HTML TUTORIAL PART 59

HTML TUTORIAL PART 59

PROBLEM:
LOOK AT THE FOLLOWING:

I am a strong man. I am a strong man.
I am a strong man. I am a strong man.
Note: For :first-child to work in IE8 and earlier, a DOCTYPE must be declared.


SOLVED:
THE CODE BELOW MADE THE HTML TIP:

<!DOCTYPE html>
<html>
<head>
<style>
p > i:first-child
{
color:blue;
}
</style>
</head>

<body>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
<p><b>Note:</b> For :first-child to work in IE8 and earlier, a DOCTYPE must be declared.</p>
</body>
</html>

No comments:

Post a Comment