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

Sam Beasley
Sam Beasley
127 Points

adding css

I think I have written the first CSS example as it was described and rechecked it several time. The program will not let me pass. What do I do?

Sam Beasley
Sam Beasley
127 Points

We’re starting out with an <h1> element and a <body> element. Add a <style> element just above the <h1>. Bummer! Don't forget your style tag. PreviewRecheck work index.html

1 `<style> 2 h1 { 3

4

5 color: blue; 6

7 } 8 ​ 9 ​ 10 ​ 11 ​ 12 ​ 13 </style><h1>Sam Beasley</h1>`

without the ticks.....

7 Answers

Scott Easter
Scott Easter
7,148 Points

Can you post the code that you have used so that we can take a look?

Here is a link on how to do it: https://teamtreehouse.com/forum/posting-code-to-the-forum

Scott Easter
Scott Easter
7,148 Points

try putting

<style>
</style>

at the beginning and end

Scott Easter
Scott Easter
7,148 Points

or if it is a link make sure you have

<link rel="stylesheet" href="css/style.css">
Sam Beasley
Sam Beasley
127 Points

<style> h1 {

color: blue;

} </style> <h1>Sam Beasley</h1>

I tried moving </style> to the end and still no good. This is exactly how it was done in the example. Unless I am just blind.

Sam Beasley
Sam Beasley
127 Points

also.. when I click on the preview it types correctly and is blue. :)

Scott Easter
Scott Easter
7,148 Points
 <style>
    h1 {
      color: green;
    }
  </style>
    <h1>Scott</h1>

I think this is what you want inside the body

Sam Beasley
Sam Beasley
127 Points

that is correct..... like I said. When I check it, it is spelled out and blue. So I assume that it is correct. I just can't get the program to let me past that exercise to progress. Got to run for now Scott. Check you again when I get to the house. Thanks for your efforts so far.

Scott Easter
Scott Easter
7,148 Points

Whenever you are back post the whole code:

Just put three ` (the key above tab and beside number 1) in a row before your code and then put three on the row after your code so I can take a look at the whole thing

Sam Beasley
Sam Beasley
127 Points

Thanks for your help. I retyped it for the 10th time and it finally took it. Onward and upward.