HTML5
HTML5 Introduction
HTML5 is the fifth and current major version of HyperText Markup Language, the standard language used to structure content on the web. Developed jointly by the W3C and the WHATWG, it 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 offline support.
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, and tel, 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.
<!-- 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 Complete HTML5 Document
<!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>
<header>
<h1>Hello, HTML5!</h1>
</header>
<main>
<p>This page uses the modern HTML5 standard.</p>
<p>It loads with a clean doctype and semantic tags.</p>
</main>
<footer>
<p>© 2026 My Website</p>
</footer>
</body>
</html>Always start every HTML document with <!DOCTYPE html>. It is not a tag — it is an instruction that keeps browsers in standards mode and prevents unpredictable quirks-mode rendering.
Key Takeaways
- HTML5 is the current standard for structuring web content.
- It adds semantics, native media, canvas/SVG graphics, and rich JavaScript APIs.
- The doctype is just <!DOCTYPE html>.
- No plugins like Flash are required for audio, video, or graphics.
