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 trialAaron Garcia
614 PointsWhat is the document root?
Not sure what document root means.
<!DOCTYPE html>
4 Answers
wdgbmakhef
712 PointsThe <!DOCTYPE> it is an instruction to the web browser about what version of HTML the page is written in.
Devon Deason
7,061 PointsI believe they're looking for the html tag.
<!doctype html>
/*BELOW IS THE ROOT*/
<html>
</html>
Nicolas Hampton
44,638 PointsAaron,
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
17,963 PointsThis 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