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

Jessica Duell
Jessica Duell
2,851 Points

Challenge task 2 of 2 trouble

I'm not sure how to change the color of the h1 tag to purple. There's no style.css code to change and I can't recall how the class structure works into it.

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

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


2 Answers

Hi there,

You can target a tag with its tag name, so you start with h1, then some curly braces to contain the styles. That looks like:

h1 {

Then you add the style - in this case, making the color purple. That looks like this:

h1 {
  color: purple;

You'll get the hang of the syntax as things progress - hope this helps!

Jessica Duell
Jessica Duell
2,851 Points

Thank you so much! I appreciate your help!