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 trialRamesh Dhanenkula
1,987 PointsThis 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>
<!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>
4 Answers
Lindsay Sauer
12,029 PointsThe 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
1,987 PointsHi 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>
Lindsay Sauer
12,029 PointsHi 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
Courses Plus Student 15,596 PointsLindsay 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:
h1 {
color: purple;
}
Hope this helps :)