The HTML5 !DOCTYPE Declaration

The important thing about using the HTML5 <!DOCTYPE> Declaration is that it should be the first information that is indicated in your HTML5 document. It is placed before the <html> tag. In fact, it is a good thing to add the <!DOCTYPE> Declaration in all HTML documents so that the browser can easily identify the type of document used. 

The <!DOCTYPE> Declaration is used differently in HTML5 and HTML4.01. 

For HTML4.01, it is necessary to specify the reference to a DTD. That is because HMTL4.01 uses the SGML as basis. Aside from that, there are also three different ways on how to use the HTML4.01 <!DOCTYPE> Declaration. 

On the other hand, reference to DTD is not longer required for HTML5 because it is not based on SGML. 

It has to be noted that with HTML5 <!DOCTYPE> Declaration does not vary whether the lower or uppercase letters are used. It is also supported by the primary web browsers that are commonly used these days like the Google Chrome, Firefox, Safari, Opera and Internet Explorer. 

Featured pages

Overview

Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …

Tags

Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…

Welcome

 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …