What is the difference between HTML and HTML5?

Home >> Blog >> What is the difference between HTML and HTML5?
By Admin Jan 14, 2021

HTML vs HTML5 - What is the difference between HTML and HTML5?
HTML5 is more powerfull and easier than HTML4, HTML5 has lots of new TAG like header, footer, nav, audio, video, main etc.
Key HTML (HTML4) HTML5
DOCTYPE DOCTYPE declaration in HTML is too longer.

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

DOCTYPE declaration in HTML5 is very simple.

Example:-
"<!DOCTYPE html>

Multimedia Support
(Audio & Video)
Audio and Video are not part of HTML4. Audio and Videos are integral part of HTML5.
Vector Graphics Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc Vector graphics is an integral part of HTML5.

Example:-
SVG and Canvas

GeoLocation 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)
Storage
  • It use cookies.
  • cookies can store only upto 4KB data in string format.
  • It also use cookies and it also provides localStorage & sessionStorage.
  • localStorage, sessionStorage can store upto 5MB string data in key-value format (can vary on different browsers).
JavaScript Support It does not allow JavaScript to run in background. It allows JavaScript to run in background using JS Web worker APIs.
Browser Support Not fully suppoerted by all new browsers. Supported by all new browsers
New Tags and Form Control Support
  • HTML5 supports many new tags like header, footer, etc.
  • HTML5 supports many new types of form controls such as date, time, range, tel, number, email, url, search, etc.
Q:- Which is better HTML or html5?

HTML5 is better than HTML because HTML5 is the latest version and has lots of feature as coampre to HTML.