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 trialAdam Munton
288 PointsI can't remember the doctype tag... can anyone help?
There's a video that starts by explaining the doctype. I'm on the challenge and I've now forgotten how to write the code.
Kuhrt Cowan
23,796 PointsThanks! haha didn't even notice I did that!
2 Answers
Phil Pickering
1,343 PointsIt's quite simple really, but you do need to remember it! :)
<!DOCTYPE html>
It's actually not an HTML tag but a small piece of SGML, hence the exclamation mark (!). Also note it doesn't have a closing tag.
It must be the first line in a HTML document, and just says "Hey web browser, I'm a HTML document so please render me on the screen using your HTML parser please!"
Adam Munton
288 PointsThanks a lot Phil, that was very helpful! Very new to this kind of thing as you can tell :)
Kuhrt Cowan
23,796 PointsHere you go! I'm always having to re-look up all my head tags! Hope this helps!
<!DOCTYPE html>
Adam Munton
288 PointsThanks Kuhrt! Very helpful :) nice of you to help.
Dustin Matlock
33,856 PointsDustin Matlock
33,856 PointsHi Kuhrt Cowan, if include your response as an answer instead of adding a comment, you're sure to receive credit for that later on. Just thought I'd let you know, in case you didn't already!