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 h1 tag to purple

am I getting closer???

<!doctype html> <html> <head> <link href="styles.css" rel="stylesheet"> </head> <body>

<h1>Welcome to My Web Page!</h1>

</body> </html> h1 { color: purple; }

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>

    <h1>Welcome to My Web Page!</h1>

  </body>
</html>
h1 {
color: purple;
}
styles.css

2 Answers

Christopher Collins
seal-mask
.a{fill-rule:evenodd;}techdegree
Christopher Collins
Front End Web Development Techdegree Student 6,343 Points

You'l need to do two things:

  1. Change your <link> code the the following: <link rel="stylesheet" type="text/css" href="styles.css">

  2. Put the style code into your CSS style sheet rather than at the bottom of the HTML document. Cut the:

h1 { color: purple; }

from it's current location in the HTML document, then paste it into the styles.css document. Save, refresh the site and your <h1> tags should all be purple.

Melanie, there is a tab at the top of the challenge that leads to the 'styles.css' sheet where you need to place the style code. It is a bit hard to see.