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 Treehouse Club: HTML Publish a Story Comments and Doctype

Hello! Could someone please explain to me in their own words what is the DOCTYPE? I am having a hard time understanding.

What exactly is the DOCTYPE??

The DOCTYPE is utilized by the web browser to identify the version of the markup language in which the page is written

A doctype defines which version of HTML, XHTML your document uses.

3 Answers

DOCTYPE informs the web browser what current version of HTML is being used. In the past, you needed to type the version of HTML in use, but you don't have to do that anymore. And, that will still be the case when the next version of HTML is released too.

Which is fantastic, is it not? XD

Thank you so much! It makes perfect sense now

its like with pictures and videos how you have MP4, MPEG2, MXF, VLC, WAV, MP3, IMG, JPEG, PDF, etc. Only instead of videos images or sound, this is code