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 html color?

How do I change the html color?

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

    <h1>[color: purple]Welcome to My Web Page!</h1>

  </body>
</html>
styles.css

3 Answers

Ari Misha
Ari Misha
19,323 Points

Hiya Roxanne!! The Question itself has two parts: 1) change "paragraph" tag to "<h1>" and 2) Change the color of your "h1" tag. You've successfully executed the first part. And in the second part, you have to head over to "styles.css" file (just click on the top right on the editor), write all your style tags in the file. This is the syntax for it: h1 { color: purple }

I hope it helped! (:

Robert Boring
Robert Boring
3,923 Points

There is a way to change the color directly in the .html file itself, you had the right idea, but just take the brackets "[ ]" away and add the style attribute inside of the h1 element and give it a color value, so it should look something like this:

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

Hope this helps.

Thanks for your help!!