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

Curtis Simonson
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Curtis Simonson
UX Design Techdegree Graduate 13,791 Points

Why won't the color change?

I am using Google Chrome. I have the correct code. I even tried red instead of blue. I saved after each change. Then tried to refresh each page. No color change. I then exited out of the tab, and reopened it. No color change.

Alexander Acker
Alexander Acker
18,123 Points

Any chance you can provide your code? Hard to help debug otherwise.

Alexander Acker
Alexander Acker
18,123 Points

Did you save your file as a ".html" file? Also what is currently showing up at the moment? Is it just RED and nothing else during a save change?

Are you adding the style to the css file? YOu are using the css selector.

could you put in your whole code in so we can make sure its not something outside the style tags

Renota: its one of the very first videos so it hasn't gone over css files yet

Curtis: i'm sorry. there is nothing wrong with the code

The cascade model might be interfering with the program. Try getting the H1 tag before the style.

1 Answer

Steven Parker
Steven Parker
231,248 Points

It's definitely red for me.

But just to be sure, here it is expanded into a properly structured HTML file, and formatted with Markdown to make it clearly readable:

test.html
<!DOCTYPE html>
<html>
<head>
  <style>
    h1 {
      color: red;
    }
  </style>
</head>
<body>
  <h1>Curtis Simonson</h1>
</body>
</html>

Try that and see if it works.