Explore Topics

Explain HTML5 Tags with Examples

Last Updated : 18 Apr, 2025 - Asked By Ashok

html5  tags  examples 

Answers
2025-07-16 17:19:53

<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>

Your Answer



Other Resources

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

Q&A Image
Q&A

Ask your coding-related doubts and get answers.

Certification Image
Certification

Earn certifications to enhance your resume.

internships Image
Internships

Hands-on projects to improve your skills.

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

blog Image
Blogs

Add your technical blogs and read technical topics.

Certification Image
Certification

Earn certifications to enhance your resume.

Q&A Image
Q&A

Hands-on projects to improve your skills.