What is the difference between HTML and HTML5?
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 declaration in HTML5 is very simple.
Example:- |
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:- |
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 |
|
|
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.