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 trialKris John Celino
498 Pointswhy everytime i type "green" it doesnt appear as green ...
CSS
<body>
<h1>Nick Pettit</h1>
</body>
<style>
<h1>janzky</h1>
</style>
<style>
<body>
<h1>wilkommen</h1> {
color: green,
}
</body>
</style>
2 Answers
edeharrison
Full Stack JavaScript Techdegree Student 11,127 PointsHi Kris,
There are some problems with the structure of the markup. You need to put all of your styles within one style tag, which goes in the head tag at the top of the page. Then anything which describes the content h1, p, div tags, etc, go inside the body tag.
This is a general structure you should follow -
<html>
<head>
<title>Title of page</title>
<style>
h1 {
color: red;
}
</style>
</head>
<body>
<h1>Some header text</h1>
</body>
<html>
Hope that helps.
Ede
Jacob Mishkin
23,118 Pointsyou need to put the CSS inside the style tag. Also you only need one open body tag and one closing body tag. the open body tag should be at the start of the HTML and the closing should be at the end of the HTML. One last thing, all HTML like your h1 tags should not go in between your style tags. I hope this helps.