Difference Between Html and Html5
Advertisements
Difference Between Html and Html5
Html5 is more power full and easier than Html4, It have lot of new tags like <header>, <footer>, <nav>, <audio>, <video>, <main> etc. It also support graphics.
In below table we discribe all basic term related to html and html5; I hope this is simple easy to learn for you.
HTML or Hyper-Text Markup Language can be referred to as the Worldwide Web’s primary language. HTML has seen many updates over time, and currently, the newest HTML version is HTML5. Some of the major differences between the two versions are;
- HTML5 supports both audio and video whereas none of these was a part of HTML
- HTML does not allow JavaScript to run within the web browser whereas HTML5 provides full support for JavaScript to run in the background.
- In HTML5, inline MathML and SVG can be used in text whereas this wasn’t possible in HTML.
- HTML5 supports new kinds of form controls, for example: dates and times, email, number, range, tel, url, search etc.
- There are many new elements introduced in HTML5. Some of the most important ones are: summary, time, audio, details, embed, figcaption, figure, footer, header, article, canvas, nav, output, section, source, track, video, etc.
Other main differences are
Doctype declaration: In HTML,it is too longer as compared to that in HTML5
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML5
<!DOCTYPE html>
Character encoding: in HTML,it is more complex as compared to that in HTML5
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
HTML5
<meta charset="UTF-8">
Vector Graphics
- HTML: Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc.
- HTML5: Vector graphics is integral part of HTML5 e.g. SVG and canvas.
Shapes
- HTML: Not possible to draw shapes like circle, rectangle, triangle.
- HTML5: You can draw shapes like circle, rectangle, triangle.
Storage
- HTML: use cookies
- HTML5: use local storage instead of cookies
Html | Html5 |
---|---|
Doctype declaration in Html is too longer <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | DOCTYPE declaration in Html5 is very simple "<!DOCTYPE html> |
character encoding in Html is also longer <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | character encoding (charset) declaration is also very simple <meta charset="UTF-8"> |
Audio and Video are not part of HTML4 | Audio and Videos are integral part of HTML5 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) |
Html5 use cookies. | It provides local storage in place of cookies. |
Not possible to draw shapes like circle, rectangle, triangle. | Using Html5 you can draw shapes like circle, rectangle, triangle. |
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 |
Works with all old browsers | Supported by all new browser. |
Difference Between Html and Html5
Features | Html | Html5 |
---|---|---|
Definition | Hypertext Markup Language is an acronym for HTML which is a primary language for developing web pages. | HTML5 is the new version of HTML which has new functionalities with Markup language as the core technology to interact with internet technologies for structuring and presenting the content. |
Multimedia support | HTML doesn’t have support for video and audio in the language. | HTML5 has the support for video and audio as they are integrated into it. |
Geographical support | HTML has the support of tracking users location who are visiting the site but the process is cumbersome and difficult to find the users location when logged from mobile devices. | HTML5 has using JavaScript Geolocation API which can be used to identify the location of any user who is accessing the website. |
Storage | HTML uses browser cache memory as temporary storage | HTML5 has multiple storage options such as application cache, SQL database, and web storage. We can JavaScript in the background with help of JS API available in HTML5 for storing. |
Communication | In HTML, Communication between client and server was done through streaming and long pooling as it doesn’t have socket support | In HTML5, it has support for web sockets which allows full duplex communication between client and server. |
Browser compatibility | HTML is compatible with almost all browsers as it is existing from long time and browsers did enough modification to support all features in HTML. | In HTML5, we have many new tags, elements and removed/modified few tags, elements so only a few browsers are fully compatible with HTML5 as of now. |
Graphics Support | In HTML, Vector Graphics support is possible with the help of other tools such as Silverlight, Adobe Flash, VML etc. | In HTML5, Vector Graphics is supported by default as it has canvas and SVG inbuilt. |
Threading | In HTML, Browser interface with which user interacts and JavaScript are running in the same thread which will lead to performance issue. | In HTML5, It has JavaScript web worker API which allows and browser interface to run in different threads. |
Google Advertisment