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 trialJosiah Ewulomi
Courses Plus Student 1,592 PointsHow do you change the color of the h1 tag to purple without quotes ?
how do you change the color of the h1 tag to purple without quotes ?
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
h1{color:purple;}
</head>
<body>
<h1>Welcome to My Web Page!</h1>
</body>
</html>
4 Answers
Steven Parker
231,248 PointsIt looks like you put your CSS in the wrong file.
Your CSS line looks good, but instead of placing it in the index.html
file, it should go in styles.css
. Select that file using the tab that displays the file name, then add your CSS code there instead.
iuliana sagaidak
4,797 Pointsfirst error is in link href="css/stylesheet.css"> - if it's in folder, you need to add css/ first. Then dont forget extencion .css
second error is h1{color:purple;} move it out from html to you css page. And dont forget a spase after element: h1 { color: purple; }
if you lost space, it can not work.
Steven Parker
231,248 PointsActually spaces between the selector and brace are optional. It works the same with or without them.
iuliana sagaidak
4,797 PointsI cheked the challenge. Here's what you need to do. You have this line <p>Welcome to My Web Page!</p> now, change it to this one (change p tag)
<h1>Welcome to My Web Page!</h1> I passed (Well done message appers)
Steven Parker
231,248 PointsThat's task 1 .. but Josiah is clearly on task 2.
Josiah Ewulomi
Courses Plus Student 1,592 PointsThank so much for your assitance, especially Steven Parker i appreciate your help, thanks again.