5 min read
ā¢Question 16 of 49easyWhat is HTML5?
The modern web standard.
What You'll Learn
- What's new in HTML5
- Key features and additions
- Why it matters
What is HTML5?
HTML5 is the fifth major version of HTML, finalized in 2014. It introduced features that previously required plugins or JavaScript libraries.
Key Additions
Semantic Elements
<header>, <nav>, <article>, <section>, <footer>
Multimedia
<audio> and <video> without Flash
Graphics
<canvas> and SVG support
Form Improvements
New input types and validation
APIs
Geolocation, storage, drag-drop
Example
index.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Features</title>
</head>
<body>
<!-- Semantic structure -->
<header>
<nav>...</nav>
</header>
<main>
<article>
<h1>Article Title</h1>
<p>Content...</p>
</article>
</main>
<!-- Native video -->
<video controls width="640">
<source src="video.mp4" type="video/mp4">
</video>
<!-- Canvas for graphics -->
<canvas id="myCanvas" width="300" height="200"></canvas>
<!-- New form inputs -->
<input type="date">
<input type="email">
<input type="range">
<footer>...</footer>
</body>
</html>