Lesson 21 What's wrong with my code?


#1

Error code: did you give your h3 header a class of "fancy?"

HTML Code:

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<!--Add your HTML below!-->
		<div class="fancy"><h3>Company</h3></div>
		<div class="fancy"><p>Us</p></div>
	</body>
</html>

CSS Code:

/*Add your CSS below!*/ .fancy { font-family: cursive; color: violet; }
`


#2

SCT doesn't like you wrapped your heading (h3) and paragraph in a div, remove the div and the class to the heading and paragraph


#3

I'm not sure what that means :confused:

I changed it to this and I'm still getting the same error code

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<!--Add your HTML below!-->
		<div class="fancy">
		    <h3>Company</h3>
		    <p>Justin Bieber</p>
		</div>
	</body>
</html>

#4

i suggest you remove your divs (<div></div>) and then add your class to your h3:

<h3 class="">i am a heading</h3>