Nowadays, HTML5 are used but it is important to know about new features that overcome the functionality of HTML4. Here, we discuss about differences between HTML versions i.e. HTML4 and HTML5. Now some highlights are discussed below:-
- Multimedia Elements:– They are In-Built in HTML5 and provide the integrated multimedia files to web pages through audio and video tags. It helps in reducing the time to integrate multimedia in web pages because HTML4 uses the plugins via third party like flash.
- User’s Geographical Location:- HTML4 are able to track the location but difficult to access via mobile devices. HTML5 are easily comfortable to access the location of the users via JS GeoLocation.
- Client Server Communication:- HTML5 provides full duplex communication between client and server via web sockets but web sockets was not available in HTML4 that why communication was done by streaming and polling.
Several tags are replaced in HTML4 with new tags of HTML5 and it can be discussed below:-
- <applet> replaced <object>:- This tag has been used to displaying the applet on web pages but it is replaced by <object> tag.
- <abbr> instead of <acronym>:- This tag is used to displaying the abbrevations in web browser. Now, <abbr> is used.
- Changes in usage of <a>:- It is used as anchor tag and referring link too in HTML4 but in HTML5, it becomes hyperlink and but always used with href attribute otherwise it acts as placeholder.
- <meta> Replaced Schema Attribute:- <meta> tag is used in header section of HTML document and carries information about data and nowadays it can be used in HTML5.
- Changes in usage of <hr>:- Now, <hr> tag is used to defining the thematic break in web page instead of draw the line. Therefore, the functionality has been only changed.
HTML5 New Tags:-
- <article> Tag:- It provides portion in the web page that contains independent material like comment by user, blog material and many more.
- <main> Tag:- It can be defined that material which are specified for that document. It can be used once at a time.
- <mark>:- It is used to highlights the text on a web page.