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

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.