HTML Vs HTML5

I was trying to understand basic differences of HTML5 against HTML (or HTML4 to be specific) and couldn't find exact information I was looking for. Hence I decided to compile it. Hope others will find it useful too.

HTML

HTML5

DOCTYPE is much longer as HTML4 is based on SGML-based.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

DOCTYPE is required to enable standards mode for HTML documents.
<!DOCTYPE html>

Audio and Video are not part of HTML4 specification

Audio and Videos are integral part of HTML5 specifications e.g. <audio> and <video> tags

Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc.

Vector graphics is integral part of HTML5 e.g. SVG and canvas

It is almost impossible to get true GeoLocation of user browsing any website especially if it comes to mobile devices.

JS GeoLocation API in HTML5 helps identify location of user browsing any website (provided user allows it)

Browser cache can be used as temporary storage.

Application Cache, Web SQL database and Web storage is available as client side storage. Accessible using JavaScript interface in HTML5 compliant browsers.

Web Sockets are not available. Generally used mechanisms are long polling and streaming.

Full duplex communication channels can be established with Server using Web Sockets. Accessible using JavaScript interface in HTML5 compliant browsers.

Works with all old browsers

Most of modern browser have started supporting HTML5 specification e.g. Firefox, Mozilla, Opera, Chrome, Safari  etc.

Does not allow JavaScript to run in browser. JS runs in same thread as browser interface.

Allows JavaScript to run in background. This is possible due to JS Web worker API in HTML5

I am not expert in HTML5 and neither in HTML4 specifications. These are just few set of differences in HTML Vs HTML5 that I compiled for immediate reference. I am absolutely sure that there is much more to add to above text. If you find anything wrong in above differences or if you want to add something to above differences of HTML Vs HTML5 then feel free to drop in your comments below.

Note: We at TechSutram take our ethics very seriously. More information about it can be found here.
Mandar Pise Opinions expressed by techsutram contributors are their own. More details

Mandar is a seasoned software professional for more than a decade. He is Cloud, AI, IoT, Blockchain and Fintech enthusiast. He writes to benefit others from his experiences. His overall goal is to help people learn about the Cloud, AI, IoT, Blockchain and Fintech and the effects they will have economically and socially in the future.

18 comments:

  1. also spinboxes cannot be included in html....

    ReplyDelete
  2. This is very helpful. i was having a doubt how it is html5 is different from html

    website templates

    ReplyDelete
  3. Simply but great explaination :)
    Thanks!

    ReplyDelete
  4. great differentiate done by you , it will be very good for me

    best regards
    freelance web designer

    ReplyDelete
  5. thanx very much :)

    ReplyDelete
  6. Nice to find this site.:) thanks to Techsutram

    ReplyDelete
  7. HTML 5 is an updated version of HTML. It’s much similar to HTML. But difference is HTML 5 contains much better support for media such as, an audio and video tag.

    ReplyDelete
  8. Thanks from me too...very useful. I think you explain what you know very well. Miriam

    ReplyDelete

    Your valuable comments are welcome. (Moderated)