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

Alex Gasick
Alex Gasick
93 Points

Defining an HTML doctype tag

How do you define an HTML Docytype tag?

I'm taking the code challenge, and have inserted <!DOCTYPE html> when asked to write an HTML doctype, and I keep getting this error message that I must define the HTML Docytype tag. How do I do that?

9 Answers

Make sure none of your other tags are open either

Make sure none of your other tags are open either

Make sure none of your other tags are open either

Make sure none of your other tags are open either

Make sure none of your other tags are open either

Marcos Vinicius Gouvea
Marcos Vinicius Gouvea
1,677 Points

did you close the tag too ? <!DOCTYPE html> </html>

speaking o doctype. I see some sites with CAPS for doctype and the charset meta tag UTF-8.

Is there anything wrong with doing all lowercase like the rest of the tags so like: <!doctype html>

Alex Gasick
Alex Gasick
93 Points

I'm all good now. Thanks everyone

Summing up a few points: The DOCTYPE declaration doesn't need a closing tag (technically, it's not a tag, it is a Document Type Declaration). In HTML, you may use it in lowercase as well, but it indeed is case-sensitive, so beware.