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 How to Make a Website HTML First Use HTML Elements

Body elements in html

I don't understand where I am going wrong. Please can you help.

index.html
<!DOCTYPE html>
<head></head>
<html></html>
<body></body>

5 Answers

Hi Michelle,

You nearly have it. Looks to just be order. Try this:

<!DOCTYPE html>
<html>
    <head></head>
    <body></body>
</html>

Does this help?

-Rich

Hi Michelle, Think of the code as a living thing: Whole thing : html , top: head /head , middle: body /body , end whole thing: /html

(html comes before head) :-)

Thank you

No problem :)

-Rich

Simon Duchaine
Simon Duchaine
14,441 Points

Your <html></html> tags need to be before your <head> and your <head> and <body> tags need to be included between your opening and closing <html> tags.

ht, he, bo

:-)