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

Hi, I added the style element to the HTML, it worked when previewed but it's telling me I haven't added the style tag.

What have I done wrong here?

index.html
<style>

  h1 {color: red;}

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

2 Answers

Sreng Hong
Sreng Hong
15,083 Points

Hi Anthony,

I think your code is right. Maybe I suggest you to redo it again.

Here is mine and it passed all the tasks.

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

Thanks for that Sreng Hong, I'll give it another go!

Anth.