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

what the heck do i do

it says to put the body tag in the middle but i do it and it dosent work

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




</html>

your meta tag and title tag needs to be in between your head tag with a closing tag. then you need a your opening body tag needs to be after that. with your style tag.

<html>
<head>
    <meta charset="utf-8">
    <title>Once Upon a Time</title>
<!--HEAD CLOSING GOES HERE-->
<!--BODY OPENING TAG GOES HERE-->
    <style>
        h1 {text-align:left; color:green}
    </style>
  </body>




</html>

2 Answers

Connor Sayers
Connor Sayers
1,515 Points

You're almost there! You have an opening <head> but no closing tag. You also have a closing </body> but no opening tag. Remember that the body tags shouldn't be placed within the head tags. Working example below.

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Once Upon a Time</title>
    <style>
        h1 {text-align:left; color:green}
    </style>
</head>

<body>
    <!-- The content of a webpage should go here. -->
</body>

</html>

Let me know if this helps! Please mark the answer as correct if it does :)

thanks but I am past that lesson now but thanks for the info now I can tell my friend how to do it he only has 52 points.