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

I need an example of how a headline is suppose to look?

Where the <h1> goes in the body?

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Once Upon a Time</title>
    <style>
      <h1>Once Upon a Time</h1>
    </style>
</head>

<We will present the Paut Neteru Tree of Life 11 Laws on this document>
  <body></body>
</html>

2 Answers

Stuart Wright
Stuart Wright
41,120 Points

Every element on an HTML page that you can see (including headlines, paragraphs, lists, tables, images... etc), belongs inside the body, not the head. Move your <h1> tags and the contents down to somewhere inside your <body> tags, which are currently empty, and you should then be able to see it displayed.

stuart is correct. the <body> element is for main contents seen on the page (images,text etc.)

an example: <!doctype html> </html> <head> <img src:href="an image.jpg"> <title>whatever the page is called</title> </head> <body> <header> <h1>main header</h1> <p>text on page> </header> <footer> </footer> </body>