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 trialNiki Grigoraidis
1,202 PointsHelp with introduction to HTML and CSS challenge task 2 of 2
the task asks to change the color of the text, I have no idea what to do.
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1>Welcome to My Web Page!<h1p>
</body>
</html>
2 Answers
Jennifer Nordell
Treehouse TeacherYou successfully changed your paragraph to an h1 element! Now all you have to do is style the h1 with the color purple. You will do this in your styles.css file. The code is as follows:
h1 {
color: purple;
}
Here we select the h1 element then follow with 2 curly braces. In between we put our style property (in this case color) and follow it up with the value (purple). Hope this helps!
Daniel Gauthier
15,000 PointsHey Niki,
I've deleted my answer since Jennifer beat me to it, but leaving the part that isn't in her answer:
The code challenge first asks you to change the paragraph tags to h1 tags, which you've done, but in the code you shared, your closing h1 tag is typed as /h1p. For some reason this passes in this code challenge, even though it should simply be /h1 within the angle brackets.
Good luck with the course!
Jennifer Nordell
Treehouse TeacherDaniel is absolutely correct! I missed the h1p bit. You should change that out with /h1. (Great catch, Daniel!)
Martin Bornman
Courses Plus Student 12,662 Pointsh1 { color: purple; }
Niki Grigoraidis
1,202 PointsNiki Grigoraidis
1,202 PointsThanks, I was trying to add a tag that is why it wouldn't work.