Open In App

Difference between HTML and HTML5

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

HTML stands for Hyper Text Markup Language. It is used to design web pages using a markup language. HTML is a combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within the tag which defines the structure of web pages. This language is used to annotate (at the note for the computer) text so that a machine can understand it and manipulate text accordingly.

Features of HTML:

  • It allows the creation of hyperlinks with the <a> tag, connecting different web pages.
  • Uses tags to mark elements and content, such as headings (<h1> to <h6>).
  • It supports embedding images (<img>), videos (<video>), and audio (<audio>) for multimedia content.
  • It provides form elements like <form>, <input>, and <button> for user input and data submission.
  • Semantic tags like <article>, <section>, and <nav> for better document structure and accessibility.

HTML 5 is the fifth and current version of HTML. It has improved the markup available for documents and has introduced application programming interfaces(API) and Document Object Model(DOM). It has introduced various new features like drag and drop, geo-location services

Features of HTML5:

  • Introduced new semantic elements like <header>, <footer>, <section>, and <article> for improved structure.
  • Enhances multimedia capabilities with native support for audio and video elements.
  • Provides the localStorage API, allowing web applications to store data locally on the user’s device.
  • Enables websites to access a user’s geographical location.
  • Uses SQL database to store data offline.
HTML HTML5
It didn’t support audio and video without the use of flash player support. It supports audio and video controls with the use of <audio> and <video> tags.
It uses cookies to store temporary data. It uses SQL databases and application cache to store offline data.
Does not allow JavaScript to run in the browser. Allows JavaScript to run in the background. This is possible due to JS Web worker API in HTML5.
Vector graphics are possible in HTML with the help of various technologies such as VML, Silver-light, Flash, etc. Vector graphics are additionally an integral part of HTML5 like SVG and Canvas.
It does not allow drag and drop effects. It allows drag and drop effects.
Not possible to draw shapes like circle, rectangle, triangle etc. HTML5 allows to draw shapes like circle, rectangle, triangle etc.
It works with all old browsers. It supported by all new browser like Firefox, Mozilla, Chrome, Safari, etc.
<HTML>,<Body> , and <Head> tags are mandatory while writing a HTML code. These tags can be omitted while writing HTML code.
Older version of HTML are less mobile-friendly. HTML5 language is more mobile-friendly.
Doctype declaration is too long and complicated. Doctype declaration is quite simple and easy.
Elements like nav, header were not present. New element for web structure like nav, header, footer etc.
Character encoding is long and complicated. Character encoding is simple and easy.
It is almost impossible to get true GeoLocation of user with the help of browser. One can track the GeoLocation of a user easily by using JS GeoLocation API.
It can not handle inaccurate syntax. It is capable of handling inaccurate syntax.
Being an older version , it is not fast , flexible , and efficient as compared to HTML5. It is efficient, flexible and more fast in comparison to HTML.
Attributes like charset, async and ping are absent in HTML. Attributes of charset, async and ping are a part of HTML 5.

There are many HTML elements which have been modified or removed from HTML5. Some of them are listed below:

Element In HTML5
<applet> Changed to <object>
<acronym> Changed to <abbr>
<dir> Changed to <ul>
<frameset> Removed
<frame> Removed
<noframes> Removed
<strike> No new tag. CSS is used for this
<big> No new tag. CSS is used for this
<basefont> No new tag. CSS is used for this
<font> No new tag. CSS is used for this
<center> No new tag. CSS is used for this
<tt> No new tag. CSS is used for this

Many new elements are added in HTML5 like nav, audio, figcaption, progress, command, time, datalist, video, figure, meter, data, section, time, aside, canvas, summary, rp, rt, details, wbr, header, footer, keygen, embed, article, hgroup, bdi, mark, output, source, track, section, ruby and many more.

HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps.You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.



Last Updated : 28 Dec, 2023
Like Article
Save Article
Share your thoughts in the comments
Similar Reads