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 Build Structure

rajbee
rajbee
6,657 Points

Doctype in more detail

Often, doctype specifies the dtd to refer to. Is it necessary to do that or is it enough to say <!DOCTYPE html> instead of something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

3 Answers

Byron Stine
Byron Stine
4,877 Points

The strict DOCTYPE you mentioned appears to be an old DOCTYPE from HTML 4.0 days back in 1999. Currently, we use HTML5 which is less strict version of HTML so it is best to use the DOCTYPE of <!DOCTYPE html> .

Durgaprasad Nagarkatte
Durgaprasad Nagarkatte
1,861 Points

The <!DOCTYPE> declaration helps the browser to display a web page correctly. There are different document types on the web. To display a document correctly, the browser must know both type and version.

For more information visit this page : http://www.w3schools.com/html/html_intro.asp

savan patel
savan patel
2,272 Points

hi raghavbehera.

it simply describe you are using HTML5 ...u dont need to memorized this if you are using emmet plugin of any text editors.

thankyou