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 trialOtto Mejia
1,001 PointsWhat does it mean to "write an HTML doctype"?
I write <DOCTYPE html> and I keep getting it wrong. Is it something I'm missing?
<DOCTYPE html>
3 Answers
Lucian Pintilie
9,938 PointsYes, you have to put an exclamation point in front of the doctype between the angle brackets
Burton King
3,938 PointsWhen you add the ! like the other user suggested it will tell your web browser, hey, this is html.
Damien Richcreek
5,527 Points<!DOCTYPE html>
states to your browser that the following information is to be read as HTML5.
Before HTML5 there were over 6 different types to declare whether it was HTML 4.01 or XHTML 1.0.
Depending on what DOCTYPE you used, it provided the dictionary of html tags that could be translated.