Today we are going to shed light on a topic which is a point of confusion among many aspiring programming students, & will also help to add value to a programmers existing knowledge. Most of you would be aware about HTML, that it stands for Hyper Text Markup Language & is used for creating web pages and web applications. It is a basic coding language which is used to describe structure of a web page. What we are going to discuss today is...What is the difference between HTML & HTML5 & How HTML5 is better than HTML...So lets start.
Multimedia support
HTML is an old language & while writing a code in HTML, there's no option to include audio or video without the use of flash player support.
On the other hand, HTML5 supports audio and video controls with the use of
Browser Compatibility
HTML is compatible with almost all browsers because it has been present for a long time, and the browser made modifications to support all the features. On the other hand, HTML5 has many new tags, & elements, which require updated & limited browsers to be fully compatible with HTML5.
Vector & Graphics
When using HTML, if you want to insert vector graphics you will need to take help of external programs or plugins such as VML, Silverlight, Flash,etc. Plus, you cannot create shapes like circles, rectangles, triangles.
In HTML5 this limitation is absent. Vector graphics is by default present in HTML5, SVG and canvas & you can also create shapes like circles, rectangles, triangles.
JavaScript
Javascript cannot be run within a same web browser in HTML as it only allows to run JavaScript in browser interface thread.
This limitation is again overcome in HTML5 as it lets programmers to run JavaScript within a web browser due to its added functionalities.
Data Storage
Data storage in HTML was limited to only browser cache method, which used to take up more space. In HTML5, data is stored in Web SQL databases, which does not put load on your browser.
So these were the key differences in HTML & HTML5...Now lets quickly understand How HTML5 is better than HTML
Handles Error Better
Prior to development of HTML5 there was no standardized process to handle structurally incorrect HTML code. The browser developers used to tests incorrect HTML in different browsers through reverse engineering, to create improved error handling process. Thanks to HTML5 error handling has become more cost & time effecient. HTML5 uses improved parsing algorithms which accepts the unstructered code making coding less time consuming.
Introduction of New Elements
There have been many improvements made in HTML5 with introduction of new semantic elements such as section, article, nav & header. This enables HTML5 for better code suggestion & makes mistake scanning process more lucid.
Supports Web Applications
Prior to HTML5 development, developers were not able to use server-side technologies & browser extensions which made it difficult for them to run applications on web browsers. HTML5 provided the developers a platform which allows web browsers to function as application with enhanced control of their website's performance.
Mobile Web Compatibility
HTML5 has made the access to web resources for end -users, on any mobile devices,very easy. This is because HTML5 is developed keeping mobile device compatibility in mind & therefore it is able to function on low end mobile devices too.