21. Class Selectors


#1

I'm getting the error code: "did you give your h3 header a class value of fancy?" but when I run the code, the h3 and p are both coming up correctly.

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<div class="fancy">
		<h3>Bucky is too precious for this world</h3>
		<p>The world doesn't deserve bucky barnes</p>
		</div>
		
	</body>
</html>

.fancy {
    font-family:cursive;
    color:violet;
}


#2

"h3 header class value of fancy"...

h3. Not div.

See your problem?


#3

Okay, but how is my solution to it 'wrong'?


#4

It's incorrect because you added the class to the div surrounding the h3 tags, not the h3 opening tag itself.


#5

So the code itself isn't necessarily wrong, it just doesn't answer the exactly the way it wants?


#6

Well, technically yes. It would do what you want, which is to make the text look 'fancy', but you're right, you'd have to put the class in h3 specifically to pass.


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.