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

How do I create the HTML element that will serve as the document root.

I've been trying for days and have re-watched the video several time, but I'm stuck on this question.

Thank you,

Cici

index.html
</html>
  <head>

  <head>
  <body>

  <body>
<html>

4 Answers

The question says create the HTML element that will serve as the document root.

By logic your answer is correct. But to pass the treehouse quiz you will need to do only what's been asked for

So there is no need to add the head and body tags for this particular questions

Just simply

<!DOCTYPE html> <!-- Question 1 -->
<html>
   <!-- Thats it. Just the html tag without the body and head -->
</html>

Thanks Gunjeet! Thought I'd tried that answer, but I guess not.

No, that was the answer to the first question. I need the second question. "Create the HTML element that will serve as the document root." Can anyone please help! I've been stuck on this for days now. Thank you.

Elisabethann Bennett
Elisabethann Bennett
8,186 Points

It looks like your opening and closing tags are backwards. The </html> needs to be at the end. So, <html> opens your HTML code, and your </html> closes it. The / signifies to the computer that it's the end of the element that you've opened.

Thank you!