Web Development Journeyπ©βπ»π¨βπ»
π» Day 14: HTML Basics ππ₯
π Hello everyone! Welcome back to Day 14 of our HTML journey! π
In the previous lessons, we learned about:
π HTML Forms
π Form Validation
π Form Attributes
Today, we're going to learn something very important for building professional websites:
ποΈ HTML Semantic Elements
We'll learn:
π§ <header>,π§ <nav>,π <main>,π <section>,π° <article>,π <aside>,π¦Ά <footer>
π€ What is Semantic HTML?
Semantic HTML means using HTML elements that clearly describe the meaning and purpose of the content.
β π <header>
The <header> element represents introductory content for a page or section.
It commonly contains:
π·οΈ Logo
π Website title
π§ Navigation
π Introductory content
Example:
<header>
<h1>My Website</h1>
<p>Welcome to my website!</p>
</header>
β‘ π§ <nav>
<nav> represents a section containing navigation links.
Example:
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</nav>
β’ π <main>
The <main> element contains the main content of the webpage.
Example:
<main>
<h1>Welcome</h1>
<p>This is the main content of my website.</p>
</main>
β οΈ Important
A page should normally have one main <main> element.
β£ π <section>
A <section> represents a thematic section of content.
Example:
<section>
<h2>About Me</h2>
<p>I am learning web development.</p>
</section>
You can use sections for:
π€ About
πΌ Services
π Course
π Contact
β€ π° <article>
An <article> represents self-contained content that could potentially stand on its own.
Examples:
π° News article
π Blog post
π’ Announcement
Example:
<article>
<h2>HTML Basics</h2>
<p>
HTML is used to structure webpages.
</p>
</article>
β₯ π <aside>
<aside> contains content that is related to the main content but not part of its primary flow.
Examples:
π’ Advertisements
π€ Author information
π‘ Tips
Example:
<aside>
<h3>Related Topics</h3>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</aside>
β¦ π¦Ά <footer>
The <footer> represents the footer of a page or section.
It commonly contains:
Β© Copyright information
π§ Contact information
π± Social media links
Example:
<footer>
<p>Β© 2026 My Website</p>
</footer>
π§© How They Work Together
A typical webpage can look like this:
βββββββββββββββββββββββββββββββ
β HEADER β
β Logo + Title β
βββββββββββββββββββββββββββββββ€
β NAV β
β Home | About | Contact β
βββββββββββββββββββββββββββββββ€
β β
β MAIN β
β β
β βββββββββββββββββββββββ β
β β SECTION β β
β β β β
β β ARTICLE β β
β β β β
β βββββββββββββββββββββββ β
β β
β ASIDE β
β Related Content β
β β
βββββββββββββββββββββββββββββββ€
β FOOTER β
β Β© 2026 Website β
βββββββββββββββββββββββββββββββ
β οΈ However, don't put semantic elements inside one another randomly. Each element should be used according to its purpose.
π» Mini Coding Challenge π
Create your own Personal Portfolio Structure using:
β
<header>
β
<nav>
β
<main>
β
<section>
β
<article>
β
<aside>
β
<footer>
Your webpage should contain:
π€ Your name
π Home
π About Me
π» Your projects
π Your skills
π Contact information
π₯ Try it by yourself and share on comment.ππ
βοΈ Next Lesson
π HTML <div> and <span>
We'll learn:
π¦ What <div> is
βοΈ What <span> is
π The difference between <div> and <span>
π― Block-level vs inline elements
ο»Ώ
Have a wonderful day! πβ€οΈ
@AbWebDeveloper
1 Β· 206 Β·