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 Create the Content Containers

What is the <!DOCTYPE html> ??

I noticed that the video in the first line there is a tag, but this tag serves?

5 Answers

<!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.

Natalia Rodriguez
Natalia Rodriguez
669 Points

Great and simple explanation. Thanks a lot!

Adam Hirschovits
Adam Hirschovits
4,983 Points

My 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!

Hi 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
Mohamed Guda
290 Points

<!DOCTYPE HTML> simply tell the browser that the document is in html :)