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

I dont know what the Document Root is

What do I need to add?

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

3 Answers

After the doctype declaraction ( <!DOCTYPE html> ) and around the <body></body> tags, you need to have the <html></html> tags. These are sometimes called the "Document root", because everything else in the page sits within them. For example:

<!DOCTYPE html>
<html>
  <head>
    ....
  </head>
  <body>
    ....
  </body>
</html>
Stan Clarke Jr.
Stan Clarke Jr.
4,745 Points

Ben is absolutely right.

Here is an additional resource at the Mozilla Developer Network.

Have fun!

Yvette Deale
Yvette Deale
19,119 Points

Ben is correct

The document root is a directory (a folder) that is stored on your host's servers and that is designated for holding web pages. When someone else looks at your web site, this is the location they will be accessing.

Your HTML reflects this but you need to have the HTML tags

That's called a Root Directory, in this instance "Document root" refers to the DOM of the file Josh is working on, which is made up of <html></html> tags.