An Introduction to HTML5

Sahil Maheshwari
4 min readFeb 12, 2023

What is HTML5

The most recent HTML version is HTML5. The term has two meanings. One is the new elements and attributes in the revised HTML language itself. The second is a broader collection of technologies that may be used with this new HTML version to create more sophisticated and potent websites and apps, such as a new video format.

Let’s examine how HTML and HTML5 vary in order to comprehend how the two have changed over time.

HTML vs HTML5

The primary markup language used on the World Wide Web is HTML. It was first intended to describe scientific texts semantically, but it has subsequently expanded to describe much more.

Today’s majority of online sites were created utilising HTML4. HTML4 still maintained its restrictions despite being significantly improved since the initial draught of HTML, which was developed in 1993. The biggest one was when web designers or developers sought to add features or material to their websites that HTML didn’t support.

In that situation, they would have to employ proprietary, non-standard technologies like Adobe Flash, which required users to set up plugins for their web browsers. Even then, certain people might not have access to that information or function. Users of iPhones and iPads, for instance, would be unable to do so because those devices don’t support Flash.

Howdy, HTML5! HTML5 was created to do away with the necessity for those proprietary, non-standard technologies. You can develop online applications that operate offline, support high-definition video and animations, and understand your location using this new version of HTML.

Let’s take a look at what’s new in this most recent version of HTML to see how HTML5 is able to accomplish all of that.

What is new in HTML5?

HTML5 was created with several key objectives in mind:

  • making code simpler for screen readers and users to read.
  • minimising HTML, CSS, and JavaScript overlap.
  • encouraging responsiveness and uniformity in design across browsers.
  • supporting multimedia without the use of Flash or other plugins.

Each of these goals served as the basis for the modifications in this new HTML version. Here, we’ll concentrate on seven of those modifications.

New Semantic Elements

A number of new tags with semantic significance were added to HTML5. These include the following:

  • <section>
  • <header>
  • <footer>
  • <nav>
  • <mark>
  • <figure>
  • <aside>
  • <figcaption>
  • <data>
  • <time>
  • <output>
  • <progress>
  • <meter>
  • <main>

These facilitate the writing of cleaner code that distinguishes clearly between style and content, which is crucial for users of assistive devices like screen readers.

Inline SVG

Scalable vector graphics (SVGs) cannot be added to web pages using HTML4; instead, you must use Flash, Silverlight, or another technology. Using the <svg> tag, HTML5 allows you to easily add vector graphics to HTML texts. Using this new element, you may also draw text, circles, rectangles, and other vector-based routes and forms.

Form Features

Because HTML5 has more form choices, you can design more intelligent forms. HTML5 includes additional form input types in addition to the usual ones, such as datetime, datetime-local, date, month, week, time, number, range, email, and url. Thanks to the new placeholder attribute, which we will cover later, you can also include date pickers, sliders, validation, and placeholder text.

WebM Video Format

Prior to HTML5, browser plugins were required in order to incorporate audio and video content into web pages. HTML5 included the WebM video format in addition to <audio> and <video> tags, which rendered browser plugins unnecessary. This is a Google-created royalty-free video format that offers an excellent compression-to-quality ratio. This is supported by the majority of browsers and can be used with the video element.

Placeholder Attribute

HTML5 introduced the placeholder attribute. This can be used in conjunction with the <input> element to provide users with a brief tip to assist them in filling out passwords or other data entry fields. You can produce better forms by doing this. It’s crucial to remember that assistive technology cannot access this characteristic.

Server-sent Events

A web page automatically receiving updated data from a server is known as a server-sent event. With HTML4, this was possible, but the website would need to ask.

HTML5 supports one-way server-sent events. In other words, a server continuously sends data to the browser. Consider how helpful it would be if your website provided access to Twitter feeds, news feeds, stock prices, and other information. In the previous version of HTML, server-sent events were supported, but the web page had to constantly request them.

Local Web Storage

Cookies are used in HTML’s previous version to store data locally. Thanks to a scripting API in HTML5, web storage is used in place of cookies. This enables you to store considerably more data locally, much like cookies.

--

--

Sahil Maheshwari

Machine Learning|Web Development|Business Management