Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS Getting Familiar with HTML and CSS Test: Changing the Look of a Web Page

Challenge task 2 of 2

I ma stocked at this challenge task. Change the color of the h1 tag to purple.

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

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

  <h1>
<h1>
styles.css
<h1> {
  color: purple;
} <h1>
Rania Zawawi
Rania Zawawi
22,240 Points

please note all your tags are <h1> in your html file in css file the general format to give color to h1 is h1 { color: purple; }

I recommend restarting the challenge. In the html you will only change the p tag to an h1. In the css file, you can't use html tags.

3 Answers

leorohmann
leorohmann
2,466 Points

For the css code you don't need the brackets. h1 { color: purple; } This will work

You also have to remove all the h1 elements excepted from "Welcome to My Web Page!"

!doctype html

<link href="styles.css" rel="stylesheet">

<h1>Welcome to My Web Page!</h1>
Rania Zawawi
Rania Zawawi
22,240 Points

please note all your tags are <h1> in your html file in css file the general format to give color to h1 is h1 { color: purple; }

Thank you all, I got it.