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 trialAli Corlett
Courses Plus Student 1,359 Points<h1> css command reports error. Don't understand why.
<h1> I have added a class field so the html looks at the css page and I thought the .h1 in css was correct. I have put in a purple code and not sure why this is not resolving. please advise
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1 class="h1">Welcome to My Web Page!</h1>
</body>
</html>
.h1 {
font color: #80080;
}
5 Answers
Mike Wagner
23,559 PointsI'm not sure if it was a copy/paste error or a typo, but you're hex color only has 5 digits. It needs 6 (or 3 if pairs are the same), in order to work properly. If that's not what your issue is, let me know :)
Bryce Santos
11,157 PointsIn your styles, for font color, it should look like this:
.h1 {
color: #800800;
}
You don't need to put font at all.
Mike Wagner
23,559 PointsBryce Santos - Guess I was more tired than I thought. I completely missed the "font" thing was there, too.
Ali Corlett
Courses Plus Student 1,359 PointsHi Bryce, that has worked, as in the font colour has changed to purple but I get a bummer message saying that it needs to be changed without quotes... Any ideas what this needs?
Ali Corlett
Courses Plus Student 1,359 Pointsthank you Mike, makes sense I'll try that now. Ali
Bryce Santos
11,157 PointsOh... it's because you need to change the color to purple. Not using hexadecimal.. but using 'purple' .
Bryce Santos
11,157 PointsYou also created a class. That wasn't needed either.
Ali Corlett
Courses Plus Student 1,359 PointsHi Bryce, ok I will remove the class from html and see what happens thanks so much,
Bryce Santos
11,157 Pointsmake sure you do this:
h1 {
color: purple;
}
Bryce Santos
11,157 PointsBryce Santos
11,157 PointsThis is also true.