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 HTML Structure

scott diallo
scott diallo
2,632 Points

What do they mean place head and body between html tags, I created <html> <h1> </h1> <body> </body> </html>

What do they mean place head and body between html tags, I created <html> <h1> </h1> <body> </body> </html> isn't this suppose to be correct?

index.html
<!DOCTYPE html>
<html>
  <h1> This is Scott Diallo</h1>

  <body> I can tell I am going to be great programmer
    </body>
</html>

4 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Hi Scott,

You're almost there.

What you're looking for is a HTML structure like this

<!DOCTYPE html>
<html>
<head>
       <title></title>
</head>
<body> 
       <h1> This is Scott Diallo</h1>

       <p>  I can tell I am going to be great programmer</p>
</body>
</html>

The head element and the body element are separate. They're sibling elements, so they work at the same level in the document structure but are children of the html element.

The head element is a place for your css and script links to go along with the title element, but with elements like h1, they're block level elements. They're content. H1 is a level 1 heading.

Hope this helps :)

Every site has <html> at the top of page , then <body>, after that you can include the <h1> tag or any other tags then close </body> then </html>

Think of this code like a living being known as html, with a - head, body and, maybe footer

<html> <head> </head>at the top <body> </body> <footer> </footer> if necessary

scott diallo
scott diallo
2,632 Points

thank you all, I got it.