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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Jeremy Wells](https://secure.gravatar.com/avatar/760da3305a1b0d2ebe462f47ea582126?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeremy Wells
1,049 PointsHow do I change the color H1 to purple?
I took some suggestions and edited to what I thought would then be correct
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1>class= "location"> Welcome to My Web Page!</h1>
</body>
</html>
.location
{color: purple;}
7 Answers
![Ace Motanya](https://secure.gravatar.com/avatar/0999af96fe35cb87a5fee77c07e24d23?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ace Motanya
31,756 Pointsh1 { color: purple; }
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsClose, but you need to target the h1 tag in your CSS selector (no need to add a class).
Using the class as target would work (but maybe not pass the challenge) if you remove the stray > between the tag name and the class.
![Jeremy Wells](https://secure.gravatar.com/avatar/760da3305a1b0d2ebe462f47ea582126?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeremy Wells
1,049 Pointsokay I'll try that. Thanks
![Jeremy Wells](https://secure.gravatar.com/avatar/760da3305a1b0d2ebe462f47ea582126?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeremy Wells
1,049 PointsI still didn't pass the challenge.
![Ace Motanya](https://secure.gravatar.com/avatar/0999af96fe35cb87a5fee77c07e24d23?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ace Motanya
31,756 PointsI went thru the challenge and it passed perfectly, make sure you are not putting a period in front of the h1 and putting a semicolon after the word purple and closing the brackets.
![Ace Motanya](https://secure.gravatar.com/avatar/0999af96fe35cb87a5fee77c07e24d23?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ace Motanya
31,756 PointsI went thru the challenge and it passed perfectly, make sure you are not putting a period in front of the h1 and putting a semicolon after the word purple and closing the brackets.
![Ace Motanya](https://secure.gravatar.com/avatar/0999af96fe35cb87a5fee77c07e24d23?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ace Motanya
31,756 Pointsmake sure you do not put a period in front of h1
![Jeremy Wells](https://secure.gravatar.com/avatar/760da3305a1b0d2ebe462f47ea582126?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeremy Wells
1,049 Pointsdoes this mean I don't need to add the .location first and then in the following line add h1 {color: purple;}?
![Ace Motanya](https://secure.gravatar.com/avatar/0999af96fe35cb87a5fee77c07e24d23?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ace Motanya
31,756 Pointsyes take out the .location put exactly what i wrote. You only need to target the h1 tag
![Jeremy Wells](https://secure.gravatar.com/avatar/760da3305a1b0d2ebe462f47ea582126?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeremy Wells
1,049 PointsThank you!
![Martin Batista](https://uploads.teamtreehouse.com/production/profile-photos/5996012/micro_20170707_202753_m3.jpg)
Martin Batista
4,606 Pointsthanks, for the answer!