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 Treehouse Club: HTML Publish a Story Body, 1st level headline, and style tags

Now change the the CSS for your <h1> element. Change the text-align to be right, and change the color to red.

I did but it still is saying it looks like task 2 is not passing.

index.html
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Once Upon a Time</title>
    <style>
      <h1>once upon a time</h1></body>{text-align:right; color:red}

    </style>

  <body></body>
</head>



</html>
<body></body>

2 Answers

Hi Jerry,

in the CSS declaration you dont use <tagname> but instead just tagname…

Like this:

<style> h1 {color: red; text-align: right} </style>

Also, in your code you put the <h1> inside the <head> whereas it belongs inside the <body>.

Hope I could help.

Paul McCormick
Paul McCormick
9,816 Points

<!DOCTYPE html> <html>

<head>

<meta charset="utf-8">

<title>Once Upon a Time</title>

</head>

<body>

<style> h1 {color: red; text-align: right} </style>

</body>

</html>

I believe this code will work for you if previous attempts have yet to work.

I may be wrong but i hope this helps and if i am wrong {anyone else} please feel free to edit what i have wrote.