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 HTML Introduction Global Structure: Part 1

Stacy Fabian
Stacy Fabian
2,246 Points

Doctype notation format confirmation

In this video he teaches that the "doctype" notation is in lower case. However, in previous videos he said it had to be all upper case. This video seems to have been made a few years ago (I think I saw 2009 somewhere) so maybe things have changed in the last few years, but I wanted to confirm...

Does it matter if it's lower or upper case? If so, what is the correct one?

Thanks! Stacy

2 Answers

If you want to write the DOCTYPE html, this is the valid ways for the html:

<!DOCTYPE html>
<!doctype html>
<!DOCTYPE HTML>

But in case of XHTML it should be like this <!DOCTYPE html>

<!DOCTYPE html> is the safest way to go.