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 trialadriano ferreira
110 PointsChallenge task 2 of 2
I ma stocked at this challenge task. Change the color of the h1 tag to purple.
<h1>!doctype html<h1>
<h1>
<h1>
<h1>link href="styles.css" rel="stylesheet"<h1>
<h1>
<h1>
<h1>Welcome to My Web Page!<h1>
<h1>
<h1>
<h1> {
color: purple;
} <h1>
Adam N
70,280 PointsI recommend restarting the challenge. In the html you will only change the p tag to an h1. In the css file, you can't use html tags.
3 Answers
leorohmann
2,466 PointsFor the css code you don't need the brackets. h1 { color: purple; } This will work
You also have to remove all the h1 elements excepted from "Welcome to My Web Page!"
!doctype html
<link href="styles.css" rel="stylesheet">
<h1>Welcome to My Web Page!</h1>
Rania Zawawi
22,240 Pointsplease note all your tags are <h1> in your html file in css file the general format to give color to h1 is h1 { color: purple; }
adriano ferreira
110 PointsThank you all, I got it.
Rania Zawawi
22,240 PointsRania Zawawi
22,240 Pointsplease note all your tags are <h1> in your html file in css file the general format to give color to h1 is h1 { color: purple; }