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'm doing the challenge to write a css selector and property and can't see what i'm doing wrong at all.

My challenge index looked exactly like my workspace and exactly like the instructor's. I just wanted to know if there was a way I could figure out what I did wrong.

4 Answers

Ben Anggoro
Ben Anggoro
36,161 Points

Just a typo. Should be color: instead of color; The whole thing is like this

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

Got it thank you.

Could you post your code? I will help explain things better, as opposed to just giving you the answer.

<body>

<style>

hi}

color;blue:

</style>

<h1>Nick Pettit</h1>

</body>

Isaac Asante
Isaac Asante
4,752 Points

Hey Ryan, you CSS code doesn't match your HTML code... See my points below:

No. 1: In your CSS code, you have the selector "hi", which is NOT an element. You mispelled "h1", which is the Heading 1 element (which formats "Nick Petit").

No. 2: The CSS declaration syntax is property: value... But in your code, you have a semicolon after the color property and a colon after the value. You have reversed this. It should be color: blue; and NOT color; blue:

Let me know if I'm right.

Thank you so much.

Isaac Asante
Isaac Asante
4,752 Points

Glad I helped! You can close the thread now...