How to do nesting in HTML


#1


https://www.codecademy.com/en/courses/web-beginner-en-y2Yjd/1/2?curriculum_id=50579fb998b470000202dc8b


My code does the correct thing, but when I click Save & Submit Code, it gives me this error message: Slow down there, Speed Racer--it looks like your

tags are nested funny, like this: <p

or

. Check the Hint if you need help!

<!DOCTYPE html>
<html>
	<head>
		<title>First font size change</title>
	</head>
	<body>
		<p> 
		    <p style="font-size: 10px"> 
		    Some text for you to make tiny! 
	    </p>
		<p> 
		    <p style="font-size: 20px"> 
		    Some text for you to make normal size! 
		</p>
		<p> 
		    <p style="font-size: 40px"> 
		    Some text for you to make super big! 
	        </p>
	</body>
</html>


#2

Hi code-77

You are nesting your tags wrong. In your code, you are opening two paragraph tags, but only closing one.
Open just one paragraph at the time, like this

<html>
    <body>
        <p style="font-size:10px;"> Some text for you to make tiny! </p>
        <p style="font-size:20px;"> Some text for you to make normal size!</p>
        <p style="font-size:40px;"> Some text for you to make super big!</p>
  </body>
</html>

Nesting paragraphs inside paragraphs it's not a good practice, altough it may work, it is just wrong, because you are nesting a inline element inside another inline element

Hope that helps.


#3

Thank you so much for the help! It worked and now I understand the concept! Once again, thank you for the help, I appreciate it!

Thanks,
Code-77