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

Aaron Garcia
Aaron Garcia
614 Points

What is the document root?

Not sure what document root means.

index.html
<!DOCTYPE html>

4 Answers

The <!DOCTYPE> it is an instruction to the web browser about what version of HTML the page is written in.

Devon Deason
Devon Deason
7,061 Points

I believe they're looking for the html tag.

<!doctype html>

/*BELOW IS THE ROOT*/
<html>
</html>

Aaron,

That tag actually indicates that the document in question is an HTML5 document to the browser. I would always include it, though I don't think it's usually required by the browser. Just get used to including it at the top of every HTML document, as it keeps the file semantically correct. In terms of the root, the

<html> 

tag is actually the root of the document. See http://www.w3schools.com/tags/tag_html.asp. I hope that clears some things up, and Happy Coding!

Nicolas

John Moya
John Moya
17,963 Points

This answer has to faces one is about directories, the document root on this case is the folder where files are stored, in your case the root of a document is the <html> tag