Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Erik Krieg
Erik Krieg
43,038 Points

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>
Erik Krieg
Erik Krieg
43,038 Points

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!