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

In this question I don't understand what needs to be done I put the {} on just like the preview. I need Help with this!

I did it just like this

<h1>{}<h1 />

index.html
<body>
  <style></style>
 <h1> {}<h1/>
  <h1>Nick Pettit</h1>


</body>

1 Answer

First, you have to add the <style> element so that internal CSS styles can be applied.

<body>
    <style></style>
    <h1>Nick Pettit</h1>
</body>

Next, you have to select the h1 element which means you will be using that <style> element we created.

<body>
    <style>
     h1 {

     }
    </style>
    <h1>Nick Pettit</h1>
</body>

Finally, you are going to set the h1 text color to green. If you remember which property that is, it is just the property color. In order to set the h1 to green, all you have to do is set its color property to green within those curly braces and end the statement with a semicolon. So then we would write:

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

I hope that helps!