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 trialAyomide Gidado
772 PointsHi challenge 1 of 3 is not working, I have tried everything!
I copied the code in the video, then I tried this. Even the preview shows the text is blue! I have done it so it might be a bug.
<body>
<style>
<h1>
</style>
Nick Pettit</h1>
</body>
3 Answers
Dan Oswalt
23,438 PointsIt wants the style element above the h1. This means both the opening and closing tags go above:
<body>
<style>
</style>
<h1>Nick Pettit</h1>
</body>
Byron Stine
4,877 PointsLooking at your initial code, the <style> tag isn't nested properly. The style tags should generally be placed in the <head>...</head> section of your HTML page. Also, I'm not sure what color the text should be in this challenge, but whatever color you want the text to be, you can declare that in your <style>..</style> section. For example, if you wanted the h1 color to appear orange, your code would look like this:
<head> <pre> <style> h1 { color: orange; } </style> </pre> </head>
<body> <br> <pre> <h1>Nick Pettit</h1> </pre> </body> <br> I hope this helps. Good luck with your HTML course!
Ayomide Gidado
772 PointsThanks guys, sorry I jumped the gun a bit. I figured it out. I managed to get it right eventually. I tried to enter all the code at once, but I figured it broke it down into 3 parts. Anyway I am enjoying the hands-on experience so far! I'll let you know if I get stuck again. Cheers.
Micheal Moorman
1,534 PointsMicheal Moorman
1,534 PointsYour problem is that you have the <h1> tag between your two style tags. At this point in the challenge there shouldn't be anything between the opening style tag and the closing tag. Also your <h1> tag needs to be in front on the same line as your </h1> tag. Finally for the sake of clarity you'll want your two style tags to line up on the same column. Hope that helps. Post if you have more questions.