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

HTML Introduction to HTML and CSS (2016) Getting Familiar with HTML and CSS Test: Changing the Look of a Web Page

change the color tag of h1 to purple

change the color of h1 to purple

<!doctype html>
    <link href="styles.css" color:purple; rel="stylesheet">
    <h1>Welcome to My Web Page!</h1> 

h1 {
  color: blue;
Brandon Gormley
Brandon Gormley
6,147 Points

Hey Naima,

The color attribute will not work in the link tag. For inline CSS it must be placed inside a style tag such as

<h1 style="color:purple;"> Welcome to My Web Page!</h1>

1 Answer

Hi Naima,

the <link> tag in the head of your html document ist not used for styling. You use it to link to your stylesheet, so the effects of the stylesheet will take effect in your html document.

So first of all delete the color attribute from the <link> tag!

Then in your css declaration you did a good job declaring the color for the h1. The syntax is correct, but you declared "blue" instead of "purple" which is what is asked in the challenge.

So the second thing to do: Change the color attribute to "purple".

Then everything should work!

Happy coding!

PS: You can upvote my post and/or mark as "best answer" (at the bottom of my post) if it helped you. :-)