Introduction to HTML5
HTML5 is the latest version of HTML. It brings new features and improvements to help developers build modern, interactive websites easily.
What’s New in HTML5?
HTML5 was created to:
- Support modern websites and apps
- Work better on mobile devices
- Include audio, video, and graphics without plugins like Flash
Key Features of HTML5:
New semantic tags like:- <header>, <footer>, <section>, <article>, <nav></nav>
- These make your code cleaner and more meaningful.
Multimedia support:
- <audio> and <video>tags for adding music and videos easily.
Canvas & SVG:
- Draw shapes, graphics, and animations directly on the page.
Form improvements:
- New input types like email, date, range, color, etc.
- Better validation in forms (e.g., required fields)
Local storage:
- Store data in the browser using localStorage and sessionStorage — useful for web apps.
HTML5 Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Example</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<section>
<article>
<h2>About Me</h2>
<p>I love web development and learning new technologies.</p>
</article>
</section>
<footer>
<p>© 2025 My Website</p>
</footer>
</body>
</html>