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 trial

HTML How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property


I keep putting {color:green} but it is not working and I don't know what else to put

Stone Preston
Stone Preston
42,016 Points

can you post your full code. you may be using an incorrect selector

<body> <style> {color: green} <h1>Nick Pettit</h1> </body>

<body> <style> h1 { color: green; } <h1>Nick Pettit</h1> </body>

It still won't work :(

7 Answers

your code should look like this

    h1 {
        color: green;
    <h1>Nick Pettit</h1>

I think your missing the style tag or misplacing it

It worked!!! Thank you so much :) :)

Hahaha finally got there :)

Kevin Naegele
Kevin Naegele
10,868 Points

Are you putting a selector in front of your code? When you are writing your CSS you have to tell it what it is affecting ie: h1,h1,p,a... ex

here is an example

h1{ color:green; }

You have to add the style sheet then write the element aka the selector and then the property with a semi colon like so <style> h1 { color:green; } </style>

This should be within the body tag

Thanks so much!!!

No problem :)

Finally, set the color of the h1 element to green.

and this is what I've got!

<body> <style> h1 { color:green; } <h1>Nick Pettit</h1> </body>

Kevin Naegele
Kevin Naegele
10,868 Points

that looks correct. try removing the space between h1 and the {. but that is correct.

It keeps saying I'm wrong!!! :(

Is it in a style tag in the body ?