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

Daniel Aboulfadl
Daniel Aboulfadl
179 Points

Having a difficult time in coloring the h1 element

<style>

h1: { color; green} </style>

Am i doing something wrong here, in coloring the h1?

index.html
<body>
  <style> 
  h1: { 
    color; green
  }


  </style> 
    <h1> Daniel Aboulfadl</h1>
</body>

2 Answers

Franklin Colbert
Franklin Colbert
4,868 Points

I beleive you are using a ; instead of a :

try this

h1 { color: green; }

Franklin Colbert
Franklin Colbert
4,868 Points

also the colon between the selector "h1" and the curly brace isn't needed

Rajeeve Narayanan
Rajeeve Narayanan
3,608 Points

You need to have the css h1 selector with the "{" key and a closing "}" after adding a semi-colon ";" . Add </html> after the closing </body> tag. Their should not be a colon after the h1 (h1 { color: green;} ) )