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 trialYernar Akimzhanov
156 PointsWhat is document root?
I didnt understand what is document root. Is it document
s body? Please help me
<!DOCTYPE html>
<html>
<head>
<title>Yernar</title>
</head>
2 Answers
Jonathan Grieve
Treehouse Moderator 91,253 Pointsdocument root in this case refers to the "root element" of the HTML document. Commonly root element in HTML refers to the
<html>
element of the document, because this element is that the very top of the DOM. The Document Object Model.
Remember,
<!DOCTYPE html>
is your document type definition, but the second time you see html it's your standard html element.
Igor Yamshchykov
24,397 PointsUsually document root is the folder that contains the file.
for example if your file is on windows machine under disk C in folder MySite, and the name of the file in that folder is index.html , the document root of index.html will be: C:\MySite
hope that helps