Course Content
Project file
0/1
Complete Web Designing Course for Beginners

Lesson 1.9 – Semantic HTML Elements

🌐 Creating Meaningful and Well-Structured Webpages


🎯 Learning Objectives

After completing this lesson, students will be able to:

βœ… Understand Semantic HTML

βœ… Know why semantic elements are important

βœ… Differentiate Semantic and Non-Semantic Elements

βœ… Use common Semantic HTML tags

βœ… Create professional webpage structures

βœ… Improve accessibility and SEO


πŸ“– Introduction

Suppose you build a webpage using only:

<div>
<div>
<div>
<div>

A browser can display it.

But when another developer sees the code, they cannot easily understand:

  • Which part is Header?
  • Which part is Navigation?
  • Which part is Main Content?
  • Which part is Footer?

To solve this problem HTML5 introduced:

🏷️ Semantic Elements

These elements clearly describe their purpose.


πŸ€” What is Semantic HTML?

Semantic HTML uses tags that clearly describe the meaning of the content.

Example:

<header>

Immediately tells us:

“This section is the header.”


<footer>

Immediately tells us:

“This section is the footer.”


🎯 Why Use Semantic HTML?

Benefits:

βœ… Easy to Read

βœ… Easy to Maintain

βœ… Better SEO

βœ… Better Accessibility

βœ… Professional Coding Practice


Non-Semantic vs Semantic

Non-Semantic

<div>
Β 

Meaning is unclear.


Semantic

<header>
<nav>
<main>
<footer>

Meaning is clear.


🌟 Common Semantic Elements

HTML5 provides many semantic tags.

Most important:

<header>
<nav>
<main>
<section>
<article>
<aside>
<footer>
Β 

🏠 Header Element

Used for:

  • Website Logo
  • Website Title
  • Navigation

Tag:

<header>
Β 

Example

<header>

<h1>NextGen Dev Hub</h1>

</header>

🌐 Navigation Element

Used for menus and links.

Tag:

<nav>
Β 

Example

<nav>

<a href="#">Home</a>

<a href="#">About</a>

<a href="#">Contact</a>

</nav>
Β 

πŸ“„ Main Element

Represents the main content of a webpage.

Tag:

<main>
Β 

Example

<main>

<h2>Welcome Students</h2>

<p>Learning HTML.</p>

</main>

πŸ“š Section Element

Groups related content together.

Tag:

<section>
Β 

Example

<section>

<h2>About Us</h2>

<p>We teach Web Designing.</p>

</section>
Β 

πŸ“° Article Element

Used for independent content.

Examples:

  • Blog Post
  • News Article
  • Tutorial

Tag:

<article>
Β 

Example

<article>

<h2>Web Designing Course</h2>

<p>Learn HTML, CSS and JavaScript.</p>

</article>
Β 

πŸ“Œ Aside Element

Used for side content.

Examples:

  • Advertisements
  • Related Links
  • Quick Notes

Tag:

<aside>
Β 

Example

<aside>

<h3>Important Notice</h3>

<p>Admission Open.</p>

</aside>
Β 

🦢 Footer Element

Used at the bottom of a webpage.

Contains:

  • Copyright
  • Contact Information
  • Social Media Links

Tag:

<footer>
Β 

Example

<footer>

<p>Β© 2026 NextGen Dev Hub</p>

</footer>

🎯 Complete Semantic Structure

<!DOCTYPE html>

<html>

<head>

<title>Semantic HTML</title>

</head>

<body>

<header>

<h1>My Website</h1>

</header>

<nav>

<a href="#">Home</a>

<a href="#">About</a>

<a href="#">Contact</a>

</nav>

<main>

<section>

<h2>About Us</h2>

<p>Welcome to our website.</p>

</section>

<article>

<h2>Latest News</h2>

<p>New course launched.</p>

</article>

</main>

<aside>

<p>Advertisement Area</p>

</aside>

<footer>

<p>Β© 2026 My Website</p>

</footer>

</body>

</html>
Β 

🌟 Semantic Layout Diagram

Β 
--------------------------------

HEADER

--------------------------------

NAVIGATION

--------------------------------

MAIN CONTENT

SECTION

ARTICLE

--------------------------------

ASIDE

--------------------------------

FOOTER

--------------------------------
Β 

SEO Benefits

Search engines like Google understand:

Β 
<header>
<nav>
<main>
<footer>
Β 

better than:

<div>
<div>
<div>
<div>

This helps improve search engine rankings.


Accessibility Benefits

Screen readers used by visually impaired users can understand webpage structure better.

This makes websites more user-friendly.


⚠️ Common Beginner Mistakes

Mistake 1

Using only div tags.

Wrong:

<div>
<div>
<div>

Better:

<header>
<nav>
<main>
<footer>

Mistake 2

Putting footer inside header.

Keep semantic structure logical.


🌟 Best Practices

βœ… Use semantic tags whenever possible.

βœ… Use one <main> per page.

βœ… Keep header at top.

βœ… Keep footer at bottom.

βœ… Use sections for grouping content.


πŸ† Mini Project – College Information Page

Create:

<header>
College Name
</header>

<nav>
Home | Courses | Contact
</nav>

<main>

<section>
About College
</section>

<section>
Departments
</section>

</main>

<footer>
Contact Information
</footer>

πŸ“ Practical Activity

Create a webpage using:

βœ… Header

βœ… Navigation

βœ… Main

βœ… Section

βœ… Article

βœ… Footer

Run it in Chrome.


πŸ“‹ Assignment

  1. What is Semantic HTML?
  2. Why is Semantic HTML important?
  3. What is the purpose of <header>?
  4. What is the purpose of <nav>?
  5. What is the purpose of <section>?
  6. What is the purpose of <footer>?
  7. Create a simple semantic webpage structure.

🧠 Quiz

Q1. Which tag represents navigation links?

A. <header>

B. <footer>

C. <nav>

D. <main>

βœ… Answer: C


Q2. Which tag contains the main content?

A. <aside>

B. <main>

C. <footer>

D. <article>

βœ… Answer: B


Q3. Which tag is used at the bottom of a webpage?

A. <header>

B. <section>

C. <main>

D. <footer>

βœ… Answer: D


πŸ“Œ Lesson Summary

βœ… Semantic HTML gives meaning to webpage content.

βœ… Semantic tags improve readability.

βœ… Semantic tags improve SEO.

βœ… Semantic tags improve accessibility.

βœ… Common semantic tags are:

  • <header>
  • <nav>
  • <main>
  • <section>
  • <article>
  • <aside>
  • <footer>
Scroll to Top