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 trialMohammad Aslam
6,053 PointsI am not sure how to change the color of the h1 tag to purple. Please help.
Not sure about this
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1 class="tag" >Welcome to My Web Page!</h1>
</body>
</html>
tag
color: purple
3 Answers
Kevin Becerra
14,243 PointsThere's two things missing you need to add. The period before the 'tag' because it's a class and you also need to add the curly braces to assign it to the class tag. Sometimes its small errors that won't allow the changes you want to be done but don't let this discourage you. Keep at it and have fun coding!
.tag{
color: purple;
}
Mohammad Aslam
6,053 Pointsthanks
Ezra Siton
12,644 Points// Class selectors are defined with the . character followed by the class name.
.tag {
color: purple;
}
https://teamtreehouse.com/library/css-basics/basic-selectors/class-selectors
Mohammad Aslam
6,053 PointsThanks, appreciate the help!
Dmitriy Zheltkov
1,527 PointsDmitriy Zheltkov
1,527 PointsSeems like you're missing the curly brackets in your CSS: