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 trialAyaz Sadiq
Courses Plus Student 5,361 PointsHow do I set the color of the h1 element to green?
How do I set the color of the h1 element to green?
<style>
h1{}
</style>
<h1>Nick Pettit</h1>
Duane Simer
2,140 PointsIt's actually not set up as inline in the given code - not that it matters; it can be inline, in a script tag, or linked to using a stylesheet.
3 Answers
Duane Simer
2,140 PointsYou want to use 'color: green;', though if you are looking for a specific shade, replace green with either hexadecimal or RGB codes. To get those codes, just google 'hexadecimal color picker' or something similar and you will find what you need.
Anthony Stapor
3,369 PointsHi, try this:
<style>
h1 {
color: green;
}
</style>
Alexander Davison
65,469 PointsYou are doing a great job! However, you are missing the CSS code to set the h1 element to green. Hint : There is a color property, and the code challenge wants you to set the value of that property to green.
Hope that helps!
juliaatl
3,890 Pointsjuliaatl
3,890 Pointsit's inline, so it will be
<h1 style="color: green";>Nick Pettit</h1>