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 Use HTML Elements

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

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

Kuhrt Cowan
Kuhrt Cowan
23,796 Points

Thanks! haha didn't even notice I did that!

2 Answers

It'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!"

Thanks a lot Phil, that was very helpful! Very new to this kind of thing as you can tell :)

Kuhrt Cowan
Kuhrt Cowan
23,796 Points

Here you go! I'm always having to re-look up all my head tags! Hope this helps!

<!DOCTYPE html>

Thanks Kuhrt! Very helpful :) nice of you to help.