March 16, 2018

Sreekanth B

What are the differences between HTML and HTML5? Which is better?

HTML is a markup language that is used to build static (non interactive and nonanimated) webpages.
In HTML, audio and video requires external software support. In HTML, finding correct GeoLocation is impossible.
HTML5 is the latest revision of HTML containing much better support for media like video and audio tags. It also defines detailed parsing rules (including "error handling") for this syntax which are largely compatible with popular implementations.
In HTML5, audio and video has internal specifications and has separate tags ie <audio> and <video>.
In HTML5, JS GeoLocation API helps in identifying location.

HTML5 has got some advance features such as to develop the ability of the browser to be an application platform, via HTML, CSS, and Javascript whereas HTML is old version so it don't have ability to develop the Website via CSS and Javascript. HTML5 is the latest revision of HTML.

There are many differences between HTML and HTML5. Below are some key differences of between them.

Key Differences

  • Audio and video were not part of previous HTML version specifications, however, both are the integral part of HTML5 specifications.
  • Vector graphics is also an integral part of HTML5 such as SVG and canvas while vector graphics is possible in HTML with the help of various technologies such as VML, Silver-light, Flash, etc.
  • In HTML, browser cache can be used as temporary storage. In case of HTML5, application cache, web SQL database, and web storage is used.
  • HTML doesn’t allows JavaScript to run in web browser, it runs in same thread as browser interface. HTML5 allows JavaScript to run in background that is possible because of JS Web worker API in HTML5.
  • HTML works smoothly with all old browsers while most of the modern web browsers have started supporting HTML5 specifications. These browsers include: Firefox, Mozilla, Chrome, Opera, Safari, etc.
HTML5 Advantages:
  • Cleaner markup/ Improved code
  • Elegant forms
  • Consistency
  • Supports rich media elements
  • Offline Application Cache.
These are just some of the changes from HTML4 and HTML5

The doctype is not as long to write out

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

<!DOCTYPE html>

Multimedia Elements

HTML5 contains built in support for integrated multimedia files into web page with video and audio tags. Previously, in HTML4, the multimedia content was integrated in web pages with third party plugins such as Silverlight and flash.

Client Side Storage

In HTML5, you can use Web SQL database and application cache that can be accessed with HTML5’s JavaScript interface

Geographical Location Support

HTML5 is extremely easy to get the user location. HTML5’s JS GeoLocation can be leveraged to identify the location of the user accessing the website.

New Tags
Instead of just using div's and span tags you can now be more specific.

and others.

Subscribe to get more Posts :