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

Daniel Stockham
Daniel Stockham
10,277 Points

I did exactly what was explained. I created the style tags and made the selector. Still saying it is not right.

Why is it not working?

index.html
<style>

    h1 {

      color:blue;

    }

</style>


<body>


  <h1>Daniel Stockham</h1>


</body>

internal style tags should always be within your <header></header>. You also need to give your style tag a type attribute like this, <style type="text/css"> go back to the last video in the first section titled adding css to a page, he lays out the different ways of adding css look for the part where he's talking about internal style tags.

you can also skip the style tags and put the code directly in your css. use the h1 selector like this h1 { color: red; } you shouldn't really need to do anything else that always worked for me.

3 Answers

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

This task is looking for the style tag to be within the body tags and above the h1 tag. Like this:

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

</style>

    <h1>Nick Pettit</h1>
</body>
Kuhrt Cowan
Kuhrt Cowan
23,796 Points

I think it just wants your style tag to be right before your h1 tag. Like this:

<body>
    <style>
      h1 {
        color: blue;
      }
    </style>
    <h1>Daniel Stockham</h1>
</body>
Daniel Stockham
Daniel Stockham
10,277 Points

I thank everyone for responding to my question, it was very helpful. I am very used to adding the style tags within the head of the html document if a separate css document is not warranted