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

Stuck Please Help!

I'm stuck on this part.. its asking me to add <style> above the <h1> When I do this: body style style h1 My Name h1 body

Gives me an error that says "Bummer! Don't forget to add your style tag" Please what am i doing wrong? I've tried a ton of different ways but still keep getting the error..

alex gwartney
alex gwartney
8,849 Points

With out seeing the quiz i think you just need to create a tag like your header tags but put style above your h1.

17 Answers

alex gwartney
alex gwartney
8,849 Points

Ok so for that one you still for got to add the style tag above the h1 tag

so for question one it needs to be like this

<style>


 </style>

<h1>Nick Pettit</h1>

Copy this in.

I think this is the correct answer for task one of this task, but don't forget the <body> tag. And don't forget slash ( / ) in closing tags.

"Task 1/3 : We're starting out with an <h1> element and a <body> element. Add a <style> element just above the <h1> . " For this task, we're adding <style> tag above <h1> ( just below the <body> tag), and don't forget to close it with </style>. Don't delete the <body> tag.

<p>
    <body>
        <style>

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

When you finish, don't forget to press "Check Work" or "Recheck Work".

"Task 2/3 : Now, write CSS that will select the h1. Don’t forget your curly braces!" To select h1, you type h1 below your <style> tag, follow by curly braces ( {} )

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

"Task 3/3: Nice! Finally, set the color of the h1 element to green." Inside curly braces, type color: green; Don't forget that "color" is followed by colon ( : ) and semicolon ( ; ) after "green". Notice that if you press "preview" you'll see that the h1 element (Nick Pettit) change to green color.

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

Back then, I got stuck on this one for long too. So, hope this help you!

Unfortunately i'm not sure that answer is helping me... the workspace before this challenge had me add the Style to the Name which was easy then it asked me to add <body> and style above the <h1> i feel like i'm doing that and i'm getting no where.. I've just been getting the error for 2 days about not adding a style tag...i'm sure its something easy it always is...

alex gwartney
alex gwartney
8,849 Points

Can you send me the link for your quiz so i can take a look at it and see if i cant figure it out?

how do i do that?

alex gwartney
alex gwartney
8,849 Points

actually just copy specific quiz that you are on just copy the url and paste it for me thanks.

alex gwartney
alex gwartney
8,849 Points

yep not a problem i know how it goes when you get stuck.

alex gwartney
alex gwartney
8,849 Points

send the screen shot to alexgwartney@aol.com if you dont have skype and if you do send me your skype name to my email.

Sorry I add to add the URL to my toolbar.. Just updated my MAC and that was missing... here you go...

https://teamtreehouse.com/library/write-a-css-selector-and-property

alex gwartney
alex gwartney
8,849 Points

So this is what i did for all three questions hopefully this helps if not let me know and we can go from there.

<style>
     h1{
       color:green;
     }

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

okay give me a min let me see what happens.. i really do appreciate you taking the time

alex gwartney
alex gwartney
8,849 Points

yep not a problem i know how it goes when you get stuck.

mine looks identical to yours and i'm still getting "Bummer! Don't forget to add your style tag!"

alex gwartney
alex gwartney
8,849 Points

if you don't cant you send me a screen shot

sending you a screen shot sorry I don't currently have a Skype account... Give me just a sec

sent it to you but i've got to go to sleep.. i'll check back with you tomorrow..Sorry