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 set the color property correctly?

Hi everyone, I'm having some trouble setting my the color in my HTML properly. Can anyone help me?

index.html
<!doctype html>
<h1> style=color: purple;</h1>
styles.css
h1 {
  color: purple;
}

1 Answer

The current code in styles.css works, but you modified index.html such that it no longer includes the link to the stylesheet. Try adding <link href="styles.css" rel="stylesheet"> back into index.html.

If you wanted to use inline css, you could do <h1 style="color:purple;">Welcome to My Web Page!</h1>.