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 trialCurtis Simonson
UX Design Techdegree Graduate 13,791 PointsWhy 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.
Curtis Simonson
UX Design Techdegree Graduate 13,791 Points<style>
h1 {
color: red;
}
</style> <h1>Curtis Simonson</h1>
Alexander Acker
18,123 PointsDid 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?
Curtis Simonson
UX Design Techdegree Graduate 13,791 PointsI just saved it within the workspace for students. When I selected it as red, nothing happened. The text just stayed black.
Renato Gama
Courses Plus Student 12,514 PointsAre you adding the style to the css file? YOu are using the css selector.
Robin Orellana
11,626 Pointscould you put in your whole code in so we can make sure its not something outside the style tags
Curtis Simonson
UX Design Techdegree Graduate 13,791 PointsRenato: I am confused about what you're asking.
Robin: my entire code is above in the previous posts
Robin Orellana
11,626 PointsRenota: 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
Renato Gama
Courses Plus Student 12,514 PointsThe cascade model might be interfering with the program. Try getting the H1 tag before the style.
1 Answer
Steven Parker
231,198 PointsIt'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:
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
color: red;
}
</style>
</head>
<body>
<h1>Curtis Simonson</h1>
</body>
</html>
Try that and see if it works.
Alexander Acker
18,123 PointsAlexander Acker
18,123 PointsAny chance you can provide your code? Hard to help debug otherwise.