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 trialNhi Ly
99 Pointshow can I change color to purple in challenge task 2
I've tried but I can't change color to purple. Please help me!. Thankyou
<!doctype html>
<html>
<head>
<h1 href="purple" rel="purple"><h1>
</head>
<body>
<h1>Welcome to My Web Page!</h1>
</body>
</html>
h1 {
color: purple;
}
2 Answers
Valeshan Naidoo
27,008 PointsIn the head section of the html file, you changed the link tag to h1. It should be kept as is.
<link href="styles.css" rel="stylesheet">
The importance of this tag is to link the css file to the html file. href is the location of the file and rel is the relationship of the file to the html page, which is that it's a stylesheet. Now that you understand the meaning behind them, you can see why it doesn't make sense to change them in this situation and why your changes won't do what you want.
Everything else you did is correct. Hope this helps.
Nhi Ly
99 Pointsthank you