HTML Basics II 9. Font Color bug?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/web-beginner-en-y2Yjd/1/3?curriculum_id=50579fb998b470000202dc8b
<In what way does your code behave incorrectly? Include ALL error messages.>
I did what it wants me to do yet I’m wrong.



<!DOCTYPE html>
<html>
	<head>
		<title>Changing the colors!</title>
	</head>
	<body>
		<h1><h2 style="color: green; font-size:16px">Big Heading</h1>
			<p><h2 style="color: violet">A giant bear and a little duck were friends.</p>
			<p><h2 style="color: red; font-size:10px">But the bear got hungry and ate the duck.</p>
	</body>
</html>


You have a paragraph <p>

and you’re trying to style it with a <h2> tag

<p style =" "

Same here you have an <h1> tag

and you’re trying to apply <h2> styles

<h1 style=" ">

@stetim94 will probs give a better reply

1 Like

the h2 in the information is on purpose, to test you i guess. In the previous exercise was explained that style is an attribute which you can add to opening, so lets say i have:

<h4>heading with style</h4>

i can just add the style attribute to the h4 opening tag:

<h4 style="">heading with style</h4>

same goes for other headings and paragraphs. The opening and closing tags should still match, no need to create additional opening tags in the process of adding a style attribute

1 Like