Saturday, May 10, 2014

Document Type Definition in HTML5

Hello everyone! in today's post we are going to discuss about the changes to "document type definition" declaration in HTML5. As you all may know prior to HTML5 i.e in HTML 4.01 declaring the type of document was a hectic task as it was very lengthy and had multiple types like ("transitional","strict","frameset") depending on what we are building. The declaration for these three types are given below:

Transitional :

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 

Strict :


Frameset :

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 

As you can see the above document type declarations from version 4 of HTML is quiet tricky and very much time consuming proccess. But with the rise of HTML5 it brought with it a new dawn of ease for declaring your document type definition. Just look at the below HTML5 code for declaring document type and you just compare both the versions,

The one and only document type declaration

  <!DOCTYPE html>

We guess till now you must have compared both the version of document type declaration and understood the difference in power and ease of use. In HTML5 just 1 declaration covers every aspect and type of documnet, thats the power of HTML5.

Hope you liked our post if you did please link this post to you blog our website and do comment.

Happy Designing !

No comments :

Post a Comment