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 trialAlexander Holman
2,358 Pointsrunning this code below and i can't figure out why it's wrong <style> h1{ color:red } </style>
I think i followed the instructions for the code correctly.
<style>
h1{
color:red
}
</style>
<body>
<h1>Nick Pettit</h1>
</body>
Robert McCormick
4,400 PointsYou are missing the semicolon at the end of your declaration. Also, I'm not sure if it will affect the functionality, but adding a space between your selector and the opening curly bracket is considered best practice. Try this and see if it works:
<style> h1 { color: red; } </style>
2 Answers
Grace Kelly
33,990 PointsHi Alexander, you forgot the semi colan at the end of your statement, try:
h1{
color:red;
}
Chyno Deluxe
16,936 PointsThe code works correctly but try placing your style tags within the <head> tags or <body> tags.
Jason S
16,247 PointsJason S
16,247 Pointsput styles inside the body