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

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

Ateke Tataw
Ateke Tataw
1,721 Points

How to change the color of an h1 element to green

I did a challenge on front end wep development and was asked to change the color of the h1 element I used from yellow to green

2 Answers

h1{color:green;} will change the h1 to green.

Peter Abou-Zeid
Peter Abou-Zeid
7,767 Points

Hi,

If you want to change the color of the font you need to use color property like Joakim,showed it earlier. If it is the background that you want to change to green you chould use the background-color property like this:

CSS h1{ background-color: green; }