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

Niki Grigoraidis
Niki Grigoraidis
1,202 Points

Help with introduction to HTML and CSS challenge task 2 of 2

the task asks to change the color of the text, I have no idea what to do.

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>

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

  </body>
</html>
styles.css

Niki Grigoraidis
Niki Grigoraidis
1,202 Points

Thanks, I was trying to add a tag that is why it wouldn't work.

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

You successfully changed your paragraph to an h1 element! Now all you have to do is style the h1 with the color purple. You will do this in your styles.css file. The code is as follows:

h1 {
    color: purple;
}

Here we select the h1 element then follow with 2 curly braces. In between we put our style property (in this case color) and follow it up with the value (purple). Hope this helps!

Daniel Gauthier
Daniel Gauthier
15,000 Points

Hey Niki,

I've deleted my answer since Jennifer beat me to it, but leaving the part that isn't in her answer:

The code challenge first asks you to change the paragraph tags to h1 tags, which you've done, but in the code you shared, your closing h1 tag is typed as /h1p. For some reason this passes in this code challenge, even though it should simply be /h1 within the angle brackets.

Good luck with the course!

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Daniel is absolutely correct! I missed the h1p bit. You should change that out with /h1. (Great catch, Daniel!)