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 trial

HTML How to Make a Website Beginning HTML and CSS Add Style to the Page

My header is not changing color with <style></style> Help?

Although i've entered the CSS code correctly when previewing the site my Header has not changed to the color blue even though ive saved the changes in workspaces and refreshed the web page

Can we see your code?

<style>

h1 { color: blue; }

</style> <hl>Zac Colson</hl>

Destiny Hicks

Donald McLamb
Donald McLamb
2,867 Points

Hi Zach,

Your HTML code would be helpful as well.

This URL explains how to go about entering code: https://teamtreehouse.com/forum/posting-code-to-the-forum

2 Answers

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher
<body>
  <style>
  h1 {
    color: blue;
  }
  </style>
    <h1>Nick Pettit</h1>

</body>

Is that where you're at? I just did that and it gave me the greenlight. I'm not sure what needs corrected in your code, since your CSS is correct. Probably just the syntax around it is not.

i am typing exactly what is given yet when ii use the preview feature my font stays black instead of turning to blue even though ive saved the code/css and ive refreshed the preview site. summerspirit