-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics
HTML headings are used to define titles or subtitles in a web page. They help organize content, improve readability, and play an important role in SEO (Search Engine Optimization).
There are six levels of headings in HTML:
<h1> to <h6>
<h1>
is the largest and most important heading.
<h6>
is the smallest and least important heading.
<h1>This is Heading 1</h1>
<h2>This is Heading 2</h2>
<h3>This is Heading 3</h3>
<h4>This is Heading 4</h4>
<h5>This is Heading 5</h5>
<h6>This is Heading 6</h6>
The text will appear in decreasing size from <h1>
to <h6>
.
Search engines use headings to index the structure and content of web pages.
<h1>
is usually the main heading of a page (used only once)
<h2>
to <h6>
are used for subheadings
<!DOCTYPE html>
<html>
<head>
<title>Headings Example</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<h2>About Us</h2>
<p>We are a team of developers...</p>
<h2>Services</h2>
<h3>Web Development</h3>
<h3>SEO Optimization</h3>
<h2>Contact</h2>
<p>Email us at support@example.com</p>
</body>
</html>
Use only one <h1>
per page
Do not skip levels (e.g., don’t go from <h1>
to <h4>
directly)
Use headings to structure content, not just for font size
Q1. Create an HTML page that includes all six heading tags.
Q2. Write a web page with one <h1>
and two <h2>
subheadings.
Q3. Add <h3>
and <h4>
headings under a service section.
Q4. Create a heading that says "My Blog" using <h1>
.
Q5. Use <h5>
to display a small subheading.
Q6. Nest a paragraph under an <h2>
heading labeled "About Me".
Q7. Show a company name using <h1>
and team roles using <h3>
.
Q8. Make a simple portfolio layout using only heading tags.
Q9. Create a recipe structure using <h2>
for steps and <h3>
for details.
Q10. Use <h6>
in a webpage footer for copyright.
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics