Explain HTML5 Tags with Examples
Understand HTML5 tags with clear explanations and practical examples. Learn how different HTML5 elements work to structure modern and semantic web pages.
Understand HTML5 tags with clear explanations and practical examples. Learn how different HTML5 elements work to structure modern and semantic web pages.
<html> – Wraps the entire HTML document
Example: <html> ... </html>
<head> – Contains info about the page
Example: <head><title>My Page</title></head>
<body> – Contains visible content on the page
Example: <body><h1>Hello!</h1></body>
<h1> to <h6> – Headings from large (h1) to small (h6)
Example: <h1>Main Title</h1>, <h3>Subheading</h3>
<p> – Paragraph for text content
Example: <p>This is a paragraph.</p>
<img> – Displays an image
Example: <img src="image.jpg" alt="My Image">
<div> – Groups content for layout or styling
Example: <div><p>Inside a box</p></div>
<section> – Defines a section of related content
Example: <section><h2>About Us</h2></section>
<header> – Top of page
Example: <header><h1>Site Name</h1></header>
<footer> – Bottom of page
Example: <footer>© 2025 MySite</footer>
<nav> – Contains navigation links
Example: <nav><a href="#">Home</a>
<br> – Line break
Example: Line 1<br>Line 2
<hr> – Horizontal line to separate sections
Example: <hr>