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 trialAldrich Alviar
2,745 Pointshow to change the color of the h1 tag to purple?
what is the steps in changing the h1 tag to purple
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<h1>Welcome to My Web Page!</h1>
</body>
</html>
2 Answers
Riku S.
11,322 PointsYour stylesheet seems to be empty, but if it's linked correctly, you can just add
h1 {
color: purple;
}
Jay Padzensky
4,731 PointsYou may also add some style elements which would permit you to change element properties in the HTML file.
<style>
h1 {
color: purple;
}
</style>
Aldrich Alviar
2,745 PointsAldrich Alviar
2,745 Pointshow to set purple color property of h1 element (without quetes)?
Riku S.
11,322 PointsRiku S.
11,322 PointsMake sure that your css file is linked properly and add those lines in your css file, it will work. I don't know what you mean with quotes, because there's no quotes that code.