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 trialRobert bridges
166 PointsWhat does it mean to "define your html doctype?
Stuck on test question.
<DOCTYPE html>
<h1>Tyler Bridges</h1>
2 Answers
Hammad Ahmed
Full Stack JavaScript Techdegree Student 11,910 PointsDefining the document type means to define the type of document which you are going to write and its version. For using HTML and its version 5, here is the doctype:
<!DOCTYPE html>
And the rest of your html code must be within the html tags
<html>
<!-- Your code --!>
</html>
And the code you want to display on the page must be within the body tags which is itself inside the html tags.
<body>
<!-- Your code --!>
</body>
Carolyn Heuser
2,816 PointsHi, Robert! It is my understanding that DOCTYPE just tells the browser which version of HTML you are using. <DOCTYPE! html> tells the browser that you are using HTML5.
Ted Sumner
Courses Plus Student 17,967 PointsThis is also correct.
Ted Sumner
Courses Plus Student 17,967 PointsTed Sumner
Courses Plus Student 17,967 PointsThis is the most complete and correct answer.