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 to change an h1 element tag to Purple

how to change h1 element tag to purple

2 Answers

Hi Beatrice,

For this task in the challenge you want to switch to the styles.css tab at the top of the challenge workspace and put your css to achieve this in there.

In order to help and not just give you the answer, you would want to select the h1 attributes and set its color to purple using

color:purple;

Should you still not be able to work this out, reply and I will help you some more.

KB :octopus:

hi, there are a couple of ways to change the header colour : One way is to give the header a direct style as shown below.

<h1 style="color:purple;">This is a Purple Heading</h1>

However to make the website the same throughout, it is best the chance the colour in the css file such as:

h1 { color: purple; }

changing the css file is the best and preferred method for most developers.