We are all familiar with HTML , it’s a markup language that is used to structure webpages and display information on these web browsers. Html was introduced around the 1990s and has been constantly evolving since. In 1997 the W3C recommended HTML4 as a good platform for web design
Though it provided several core features, which were useful, HTML4 had its shortcomings too. It does not facilitate implementations that interoperate with each other. There are primarily 3 variations in html, SGML based and XML based and now there’s the new version –HTML5. The HTML5 is still not a complete version; it is yet to be standardized and is currently going through quite a lot of up gradations. Let’s take a closer look at the two versions and run a complete retrospection on their pros and cons.
To begin with HTML4 is an SGML application conforming to International Standard ISO 8879 whereas HTML 5 is a combination of XHTML and the latest version of HTML.
As compared to HTML 4 The HTML 5 version offers new elements to its structure like header, section, footer, nav, article, aside etc.
- Header: contains headings, subheadings etc.
- Nav: used for navigation of the website as well as table of contents present on the webpage.
- Section: This is a broad category of a webpage.
- Article: This element includes a particular section of webpage like news, blogs, testimonials etc..
- Aside: contains content that may relate to a specific segment or part of a webpage.
- Footer: usually contains copyright data, author’s name, links etc.
While working on HTML4 you need to use flash or any suitable, plug-in to embed video however, with HTML 5 you can directly embed videos to a webpage. This works well for all Apple devices as Apple as disabled Flash on its mobile devices.
Application Programming Interfaces:
HTML 5 has been introduced with several new APIs. These APIs provide an improved and easier web application development system. A few examples of this API s are Drag and drop, Database storage offline, Editing of the document and Canvas 2D APIs, etc.
Better effects through CSS:
Several of the elements in HTML4 used for visual effects and presentation of a webpage have been removed and instead the Cascading Style Sheets have been implemented to do the same and much more.
Flexibility and syntax
Due to its amazing flexibility and convenience of use it is preferred over its predecessor. It specifies the related parsing and lexing rules enabling it to show similar results even if the syntax has minor errors.
Besides being capable of running videos on its own HTML5 also supports video games on its browser.
Use of Tags:
Unlike the version 4.0 the HTML 5 allows you to include many new tags and new names for old tags with other features like local storage, JS-based hacks or Flash, validation form etc. making it easier and faster for developers .
Besides the above mentioned benefits HTML5 also gives you the advantage of including added features like GPS , which has become very usefull nowadays. Canvas feature of the version 5 enables you to edit and manipulate graphics, photos etc. using Java Script. Another capability is the provision made to support SVG and MathML for drawing static or dynamic vector graphics and scripting, indexing, and better compression.
Even though HTML5 has all the above benefits, it must be used carefully as it is not a standardized language, hence might require you to run frequent up gradations. Personally, I think smart use of both the versions of HTML will give you optimum results.