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

Asking me for a style tag??

I need help so i'm doing the challenge and I'm pretty sure i have everything correct but its asking me for a style tag. http://teamtreehouse.com/library/write-a-css-selector-and-property task 1 http://gyazo.com/93d9484dedfd84a7999322ceb0268f3a <--- screenshot of the challenge

5 Answers

This should work. The problem is that you had the opening body tag inside the style tag.

<style>
        h1 { color: red; }
</style>
<body>
    <h1>Bryan Capps</h1>
</body>

Oh thanks a bunch i thought i had to put it above my name from the video. Thanks!

Heidi Mason
Heidi Mason
16,777 Points

In real development having the style tags above the body tags works, but I get an error for this exercise unless I put the style tags inside the body:

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

Alright thanks that helped also.

Keith, your code should look like this, for example:

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

<h1>Some Header</h1>

is you CSS surrounded with style tags? Here is an example:

<style>
        /* write your CSS rules here */
</style>
Heidi Mason
Heidi Mason
16,777 Points

Both style and h1 tags should go on the inside of the body tags.

Heidi Mason
Heidi Mason
16,777 Points

Np. This was my first Treehouse forum answer so I'm learning too!