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 trialJessica Duell
2,851 PointsChallenge task 2 of 2 trouble
I'm not sure how to change the color of the h1 tag to purple. There's no style.css code to change and I can't recall how the class structure works into it.
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1>Welcome to My Web Page!</h1>
</body>
</html>
2 Answers
Katie Wood
19,141 PointsHi there,
You can target a tag with its tag name, so you start with h1, then some curly braces to contain the styles. That looks like:
h1 {
}
Then you add the style - in this case, making the color purple. That looks like this:
h1 {
color: purple;
}
You'll get the hang of the syntax as things progress - hope this helps!
Jessica Duell
2,851 PointsThank you so much! I appreciate your help!