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 trial101 Points
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
David Tonge
Courses Plus Student 45,640 PointsThe 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.
101 Points
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
11,437 Pointsmake sure that you put your style tag nested inside the body.<>
David Tonge
Courses Plus Student 45,640 PointsI 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
19,419 Pointsbest 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>