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 trialAndré Silveira
Courses Plus Student 374 PointsWhat is the <!DOCTYPE html> ??
I noticed that the video in the first line there is a tag, but this tag serves?
5 Answers
Damien Richcreek
5,527 Points<!DOCTYPE html> just declares that the following information is to be read as HTML5.
A loose analogy would be if you picked up a book that has Japanese Text on the front, you can assume it to be written in Japanese.
Patrick Spring
8,136 PointsAdam Hirschovits
4,983 PointsMy analogy (I am a complete novice at this!) is that it is telling the server "hey, before you interpret this page, make sure you are aware that it will be in "html!".
I suppose a loose analogy would be someone warning you "Andre, before this person starts talking to you, be aware that he will be talking to you in French", so when that person talks to you, you are aware that he will be talking to you in French, and you are ready to interpret it!
Jovanny Elias
16,204 PointsHi there, Patrick Spring already gave you a link. But for future references you can always check out w3schools.com. They explain and have demos you can play around with to see how things work.
Mohamed Guda
290 Points<!DOCTYPE HTML> simply tell the browser that the document is in html :)
Natalia Rodriguez
669 PointsNatalia Rodriguez
669 PointsGreat and simple explanation. Thanks a lot!