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 trialJerri Thomas
533 PointsNow change the the CSS for your <h1> element. Change the text-align to be right, and change the color to red.
I did but it still is saying it looks like task 2 is not passing.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
<h1>once upon a time</h1></body>{text-align:right; color:red}
</style>
<body></body>
</head>
</html>
<body></body>
2 Answers
Unsubscribed User
Front End Web Development Techdegree Student 33,900 PointsHi Jerry,
in the CSS declaration you dont use <tagname> but instead just tagnameβ¦
Like this:
<style> h1 {color: red; text-align: right} </style>
Also, in your code you put the <h1> inside the <head> whereas it belongs inside the <body>.
Hope I could help.
Paul McCormick
9,816 Points<!DOCTYPE html> <html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
</head>
<body>
<style> h1 {color: red; text-align: right} </style>
</body>
</html>
I believe this code will work for you if previous attempts have yet to work.
I may be wrong but i hope this helps and if i am wrong {anyone else} please feel free to edit what i have wrote.