Coding Newbie

html5-html-difference

Difference between HTML5 and HTML

In this article, we will cover what HTML is, and what are some basic differences between HTML and HTML5. Understanding difference between HTML and HTML5, as well as advantages and disadvantages can clearly help you create proper web page structure.

What is HTML?

HTML stands for Hypertext Mark-up Language. It is a language used by web developers to create web pages. We label HTML elements with so-called tags, bracketed in angle brackets (such as <html>, <div>, <img>, etc). These elements are building blocks of every page on the web.

If you wish to read about HTML in detail, above all you should read the post “What is HTML? Fully Understand HTML Basics”.

And what is HTML5 then?

HTML5 is actually the fifth version of HTML and the current HTML standard. It was established in 2014, and new standard added multiple new functionalities.

HTML5 is simply a term for a collection of latest web technologies. The HTML Living Standard is included, as well as JavaScript APIs for storage, multimedia, and device access.

To check if a webpage is HTML5 or 4 version, you should check the DOCTYPE at the very top of the webpage in a page source code. If doctype declaration is simple <!DOCTYPE html>, undoubtedly it is an HTML5 declaration. Older HTML declarations are more complicated and possess additional information regarding the type of a document.

Note: HTML5 declaration is not case sensitive. So, !DOCTYPE html, !doctype html, !DocType html, it has the same effect.

What are the main differences between HTML and HTML5?

There are numerous differences between these two versions of HTML, and new functionalities were added to HTML5. Using the advantages of HTML5 can really make your website look more professional and user friendly.

The most important differences:

  • Audio and video components are an integral part of HTML5, and that is not the case with basic HTML.
  • Vector graphics (SVG, Canvas) are part of HTML5. Drawing vectors in HTML is possible only with the help of other technologies like Silverlight, VML, Flash, etc.
  • In HTML5 you can draw some basic shapes, which is not possible in HTML.
  • HTML5 has specific tags for different page structure elements (headers, sections, footer, etc), which allows you to have clear web page structure. On the other hand, HTML uses <div> tag for these needs.
  • HTML5 is more mobile friendly.
  • HTML uses local storage to store data, contrary to HTML5 which uses cookies.
  • HTML5 supports running JavaScript code in the background, while HTML does it within the browser.
  • HTML works fine with all old browsers. HTML5 is supported by most of the modern web browsers.
  • HTML5 is compatible with JavaScript Geolocation functionality, which allows you to detect actual geolocation of a user browsing your website.

Which version should you use?

HTML5 has numerous advantages when it comes to a modern day user. However, which one to use depends solely on your needs.

Although HTML5 is the new version and mark-up language standard, it does have some disadvantages. It is a work-in-progress and requires the use of modern web browsers, which can limit the number of page views you will get.

HTML has limited functionality, which makes it much easier to learn, especially if you have just started to learn web development. Also, if you are making some plain, simple website, which does not require the use of any above listed HTML5 properties, in that case a better way to go is to use HTML.

If you are working on a more complex, and dynamic web page, without a doubt HTML5 is a better option and a modern day solution.

Conclusion

We have learned what HTML and HTML5 are, and what are some main differences that distinguish them.

HTML5 is the newer HTML standard, and as such it possesses many new options that can improve browsing experience.

Which one you should use depends on your needs. For simple pages, wider browser support, and learning purposes, HTML is the right choice. If we are talking of more complex projects, then you should make the use of HTML5 functionality.

%d bloggers like this: