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 trialTim Veach
271 PointsI have no idea whats wrong
Help, whats wrong with this?
<style>
h1 {
color:blue;
}
</style>
<body>
<h1>Nick Pettit</h1>
</body>
5 Answers
Ryan Field
Courses Plus Student 21,242 PointsYou don't need to make multiple forum posts for the same question. Just add on to your last post. In any case, please pay attention to the challenge instructions. You have the wrong colour. :)
Edit: Like Samuel Webb says below, you also have the style tags in the wrong place.
Frederico Graciano
Courses Plus Student 2,768 Points<!DOCTYPE html>
<html>
<head> // open head , style need to be inside the <head></head> after the title.
<title></title>
<style>
h1 {
color:blue;
}
</style>
</head> // close head
<body>
<h1>Nick Pettit</h1>
</body>
</html>
Ryan Field
Courses Plus Student 21,242 PointsWhile usually correct, this challenge is specifically asking you to put the style tags above the h1
inside the body.
Frederico Graciano
Courses Plus Student 2,768 Pointsdid you try, instead of putting the
<style>
h1 {color: blue;}
</style>
put on the body tag like this:
<h1 style="color:blue;">Nick Pettit</h1>
Samuel Webb
25,370 PointsAlso, the style tag needs to be contained in the body, similar to the h1.
Luciano Bruzzoni
15,518 PointsHey there, the instructions say to add the style above the <h1> element, so it should be as follows
<body>
<style>
h1 {
color: green;
}
</style>
<h1>Nick Pettit</h1>
</body>
that should do it!