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 trialValentyna Shlonchak
1,515 PointsI cannot complete the task.
Hi, I cannot complete the task. what do you mean by: Nice! Finally, set the color of the h1 element to green.
<body> <style>
h1
{
color:green;
}
<style>
<h1>Green</h1>
</body>
isn't the above correct?
Thanks!:)
4 Answers
Leonardo Hernandez
13,798 PointsYour css code is correct, but you did not wrap the css code in a style element properly.
The style element needs to open and close like most other elements.
<style>
body {
background-color: white;
}
</style>
<!-- My css selector targets the body element below -->
<body>
</body>
. Ali
9,799 PointsHi Airrick,
You Style needs to be in head section . just a heads up :)
Airrick Dunfield
18,921 PointsThanks Muhammad, I tried in the Challenge mentioned in the questions and for that example and it needed to go directly above the h1 element
http://teamtreehouse.com/library/write-a-css-selector-and-property
Jeff Busch
19,287 PointsNo it doesn't.
Valentyna Shlonchak
1,515 PointsThank You! :)
Airrick Dunfield
18,921 PointsLeo's is a great answer and the proper one. I just went through the challenge and the following worked. Althrough, Leo's set is what you will want to do while creating any website.
<body>
<style>
h1 {
color: green;
}
</style>
<h1>Nick Pettit</h1>
</body>