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

How do I change the color to purple?

How do I change the color to purple?

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

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

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

2 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

Hi Patrick,

You can literally just change the word "blue" to "purple" in the css rule for color.

Cheers :beers:

-Greg

make sure define the file type...in this case when you are linking your css to your html page make sure the code is as follows; <link type='text/css' rel='stylesheet href='style.css'> TYPE is the file type in this case is a css file REL is the relationship btwn the file and the page ; in this case the file is used to style the page thus stylesheet HREF indicates the path you save the file in your computer. here at treehouse things are simple but when you are using ordinary text editors like notepad++ and atom, finding the path of the file is hard but to make things simple, just save your files on the desttops for code to work.