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

what is a html doctype?

so could you give me a hint

2 Answers

Sreng Hong
Sreng Hong
15,083 Points

Doctype is a word from document type that help specific the version of html you're using.

Include <!DOCTYPE html> in your html file means that you tell the browser you use html 5.

Is that clear? Hope this helps.

Boy Buijsman
Boy Buijsman
13,773 Points

It is a tag that specifies the documents type. It was created by microsoft to tell the browser what type the document was in. As i understand, its no longer entirely needed to declare.

Jason Taylor
Jason Taylor
3,059 Points

I would still declare it but use the shortened HTML5 version <!DOCTYPE html>

Boy Buijsman
Boy Buijsman
13,773 Points

I noticed that for seo purposes it is best to declare it. But modern day browers read the page and see what type it is in regardlrss if you declare the type