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

Why does this throw an error: select background and set color to green?

Heres what I did but the editor keeps throwing an error in the challange task Error reads: "Bummer make sure you are setting the h1 tag's color to green" Please help.

''' <style> h1: {color: green;} </style>

<h1>Nick Petit </h1>


  h1: {
  color: #008000;


2 Answers

Muhamed Asil
Muhamed Asil
7,453 Points

select h1 tag without typing colon(:) to be

h1 { color: green; }

Steven Parker
Steven Parker
229,982 Points

You have some stray punctuation.

There should not be a colon between your tag name and the open brace of your CSS rule.

Also, the challenges can be very picky. So while your numeric code works this time, in general if the instructions ask for a color by name it might be good to use the actual name.