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

What am I missing

"<stlye> body { color: blue; } h1 { color: blue; } </stlye> <body> <h1>Scott Ohman</h1>

<p>I can't figure out why my text is not turning blue</p> </body>"

4 Answers

The code looks correct, could you post some more code so we could get a sense of the overall context? I'm assuming you're asking this question for personal reasons because the challenge asks you to turn your text to green.

Thank you for replying. I enter the style code exactly as shown in the class for coloring the <h1>name</h1> and it did not change color. The next exercise was to add <body></body> and add a style code to color it. The program will not check this of fas complete. It gives me the message"bummer your forgot the style code. I can try just continuing on to the next class?

Philip Schultz
Philip Schultz
11,437 Points

make sure that you put your style tag nested inside the body.<>

I checked the code challenge and it asks you to set the h1 to green.

Above the h1 your code should look like:

<style>
h1{
color: green;
}
</style>
Brian Goldstein
Brian Goldstein
19,419 Points

best practice is to put the style declarations in their own stylesheet, but for this exercise, David is right - you need to declare at the top of the document the style tag, put your rules inside of it, and close it (typically this goes inside the head tag).

<!DOCTYPE html !>
<html>
<head>
<title>Brian G</title>
<style>
h1 { color: green;}
</style>
</head>
<body>
<h1>Brian G</h1>
<p>Come on in!</p>
</body>
</html>