Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEthan Rogers
2,707 PointsSeriously?
I am performing this task correctly. I KNOW that I am performing this task correctly because I performed this task earlier when playing around with the Peg Leg story... so why is is saying that I am not completing this correctly when I'm doing the exact same thing I did earlier that actually works???
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
</h1> {text-align:right;color:red} <h1>
</style>
</head>
</body>
<h1>Once upon a Time</h1>
<body>
<head>
</html>
3 Answers
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsHey , you have put your contents correctly , just some syntax errors .
Try this :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
</h1> {text-align:right;color:red} <h1> // First open the h1 tag then close it
</style>
</head>
</body> // use opening body tag
<h1>Once upon a Time</h1>
<body> // use closing body tag
<head> // remove this head as you have already closed head tag above
</html>
Here is the actual code -
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
<h1> {text-align:right;color:red} </h1>
</style>
</head>
<body>
<h1>Once upon a Time</h1>
</body>
</html>
Ethan Rogers , hope it helps :)
Keep coding . These are the errors we all do .
Ethan Rogers
2,707 Pointsunfortunately neither of those answer why the words I replaced (right instead of left, red instead of whatever color was previously there) wont register. All the code there was written by someone else. This task is, literally, replacing two words and it isn't recognizing that they were changed.
Alejandro Narvaja
Courses Plus Student 7,340 PointsI know that you task is change these words, but if you have wrong the others tags then won't work.
Ethan Rogers
2,707 PointsAfter a dozen attempts to submit and it telling me the answer was wrong it finally accepted it as correct.
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 Pointsah ok . You should mention that in the question that it was your task . :)
Good that you got it right
Alejandro Narvaja
Courses Plus Student 7,340 PointsAlejandro Narvaja
Courses Plus Student 7,340 PointsBecause you have the tags inverted. First comes <body>, after comes </body>
And the last head remove it