HTML5

HTML5 Introduction

HTML5 is the fifth and current major version of the HyperText Markup Language, the standard language used to structure content on the web. It was developed by the W3C (World Wide Web Consortium) and WHATWG, and adds native support for multimedia, richer semantics, powerful JavaScript APIs, and new form controls — all without relying on third-party plugins like Flash.


What is HTML5?

HTML5 is the latest evolution of HTML. It is not a single technology but a collection of features that make the web more capable: semantic elements that describe meaning, native audio and video, 2D drawing with canvas, scalable vector graphics with SVG, new form input types, and a set of JavaScript APIs for storage, geolocation, drag-and-drop, and more.

Key New Features of HTML5

  • Semantic elements: <header>, <nav>, <section>, <article>, <aside>, <footer>, <main>, and <figure> describe the structure and meaning of a page.
  • Multimedia: the <audio> and <video> tags play media natively without plugins such as Flash.
  • Graphics: <canvas> enables scriptable 2D drawing, while inline <svg> supports scalable vector graphics.
  • New form input types: email, url, number, range, date, color, search, tel, and more, with built-in validation.
  • JavaScript APIs: Web Storage (localStorage/sessionStorage), Geolocation, Drag and Drop, Web Workers, and the History API.
  • Simplified, cleaner doctype and character encoding declarations.

The Simplified HTML5 Doctype

One of the most visible changes in HTML5 is the doctype. Older versions of HTML required long, hard-to-remember declarations. HTML5 reduces this to a single short line that tells the browser to render the page in standards mode.

HTML4 vs HTML5 doctype
<!-- HTML 4.01 (old, hard to remember) -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">

<!-- HTML5 (short and simple) -->
<!DOCTYPE html>

A Minimal HTML5 Document

Basic HTML5 page skeleton
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First HTML5 Page</title>
</head>
<body>
  <h1>Hello, HTML5!</h1>
  <p>This page uses the modern HTML5 standard.</p>
</body>
</html>
💡

The <!DOCTYPE html> declaration is case-insensitive and must be the very first line of the document so the browser uses standards (not quirks) mode.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships