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 Introduction to HTML and CSS (2016) Getting Familiar with HTML and CSS Test: Changing the Look of a Web Page

<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

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>

    <h1 class="h1">Welcome to My Web Page!</h1>

  </body>
</html>
styles.css
.h1 { 
  font color: #80080;
}

5 Answers

I'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 :)

This is also true.

In your styles, for font color, it should look like this:

.h1 {
color: #800800;
}

You don't need to put font at all.

Bryce Santos - Guess I was more tired than I thought. I completely missed the "font" thing was there, too.

Hi 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?

thank you Mike, makes sense I'll try that now. Ali

Oh... it's because you need to change the color to purple. Not using hexadecimal.. but using 'purple' .

You also created a class. That wasn't needed either.

Hi Bryce, ok I will remove the class from html and see what happens thanks so much,

make sure you do this:

h1 {
color: purple;
}