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 trialDavid Oliver Doswell
Courses Plus Student 52 PointsCSS
In How to Make a Website, after writing my style element above h1, as instructed, I am then told to write CSS (make the heading green) but I am doing something wrong.
David Oliver Doswell
Courses Plus Student 52 Points<body> <style> { color: green <h1>DavidDoswell</h1> } </style> </body>
4 Answers
Matt Hollis
689 Pointsfor me I had to put the thing directly on top of the h1 element, within the body.
David Oliver Doswell
Courses Plus Student 52 PointsI did that. Wait, you mean straight across?
David Oliver Doswell
Courses Plus Student 52 PointsAlso, no backward tics - iPad.
Jahan Zeb
11,169 PointsTwo ways to do this:
Define style within h1 tag:
<h1 style="color: green;">DavidDoswell</h1>
Define h1 style prior to h1 tag
<style>
h1 {color: green;}
</style>
<h1>DavidDoswell</h1>
Stone Preston
42,016 PointsStone Preston
42,016 Pointscan you post the code you are using. You will need to format it using markdown to make it appear in the forum. This post has instructions on doing that.