Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the importance of the HTML DOCTYPE?

user-image
Question added by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date Posted: 2015/04/22
shuaa zoor
by shuaa zoor , معلمة , مدرسة نهر العلوم

The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.

 

The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

 

In HTML4., the <!DOCTYPE> declaration refers to a DTD, because HTML4. was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

 

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

 

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

 

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.