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 trialJarvis Cooper
179 PointsI am adding a css color command that will change the color of my html header, but I forget what to add where to referenc
<style> { style: blue; } </style>
what is wrong and/or missing?
<style>
{ style: blue;h1
</style> }
<h1>Jarvis Cooper</h1>
4 Answers
Colton Ehrman
Courses Plus Student 5,859 PointsSo the structure of css is like this
<css selector> {
<css property> : <property value>;
}
Now let's fill in this structure with what we want which is to change the text color of header element
header {
color : white;
}
Kelly von Borstel
28,880 PointsHi, Jarvis. Here's an example of how to add styles to html. Try following this format and see if it works.
<style>
p {
font-size: .8em;
padding: 5px;
}
</style>
jeremy hudson
2,589 Pointsyou need a selector that targets your header for example header { background-color: blue; }
Nik Tuลก
6,550 Points<style>
header: { background-color: blue; };
</style>
and if you want to change fonts color you must write code like example below:
<style>
header h1 { color: blue; }
</style>