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

Hello. I am having an issue typing this code could anyone help me please? Thank you.

I am not quite understanding this coding project. Could someone help me please?

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



</html>

3 Answers

nico dev
nico dev
20,364 Points

Hi Wilfried Allico ,

Remember that in the first part of the challenge, you're required to write an opening and closing body tag below/after the closing head tag. Try adjusting that.

Similarly, when you write an <h1>, in the second part of the challenge, you would want it to be information for the browser (like the style, etc. in the head), or you want to be displayed to the user (like text in the page, etc. within the body of the document?).

HTH!

Hi Wilfried

Task1 asked that you add <body> tag after the closing </head> tag.

Task 2 asked you to insert <h1> tag (which goes between the <body> tag).

Task 3 asked to change the h1 text-align to right and color to red.

Below is how it should look.

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

</html>

Thank you guys it makes a little more sense now! I guess the best way to improve is to practice!