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

Ramesh Dhanenkula
Ramesh Dhanenkula
1,987 Points

This code is working in preview, but not working when the 'check work' button is clicked and I can't move on?

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

<h1><font color = "purple">Welcome to My Web Page!</font></h1>

</body> </html>

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

    <h1><font color = "purple">Welcome to My Web Page!</font></h1>

  </body>
</html>
styles.css

4 Answers

The font tag is not supported in html5 and should be considered deprecated. Instead, you should use the style attribute:

<h1 style="color:purple">Welcome to My Web Page!</h1>
Ramesh Dhanenkula
Ramesh Dhanenkula
1,987 Points

Hi Lindsay,

I'm still getting the same error...

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

<h1 style="font-weight:purple">Welcome to My Web Page!</h1>

</body> </html>

Hi Ramesh,

Sorry, seems I'm still a bit sleepy; font-weight is for styles like bold, etc. It should instead be color:

 <h1 style="color:purple">Welcome to My Web Page!</h1>

I'll edit my previous post.

Michael Afanasiev
PLUS
Michael Afanasiev
Courses Plus Student 15,596 Points

Lindsay is correct, but in this challenge you must use your styles sheet that is provided to you. Notice the

<link href="styles.css" rel="stylesheet">

in your HTML? that means there is a style sheet linked to your HTML code. Inside your stylesheet you must write the following:

styles.css
h1 {
  color: purple;
}

Hope this helps :)