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!

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

how to set the color the h1 element to green?

how to set the color the h1 element to green ?


1 Answer

Juan Guillermo Mariño
.a{fill-rule:evenodd;}techdegree seal-36
Juan Guillermo Mariño
Front End Web Development Techdegree Graduate 19,423 Points

Hello Shadreck, look here is the solution: remember every time you open an html tag <> you must close it </> so the first step it says: We're starting out with an <h1> element. Add a <style> element just above the <h1>.

<style> </style>

Later it says to select the h1 element in the style tag like as if it was a stylesheet Now, write CSS that will select the h1. Don’t forget your curly braces!

<style> h1 {} </style>

And finally set the color to green... Nice! Finally, set the color of the h1 element to green.

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

The "color" is a css property that will modify the color of text every time you give the value, in this case that will be "green" you must close it with ";" and every time you open and close the css rules with {} so the <style> tag is technically CSS written in the html code


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

Have a great day!