Category: html_css
Semantic HTML elements
Published on 23 Jun 2026
Explanation
Semantic HTML elements provide meaning to
the structure of a webpage, making
it easier for browsers, search engines,
and developers to understand the content.
Code:
<header>
<h1>HackForge Academy</h1>
</header>
Explanation
The <header> and <nav> elements are
used for introductory content and navigation
links, helping users move through the
website.
Code:
<header>
<h1>My Website</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">Courses</a>
</nav>
Explanation
The <main> and <section> elements organize
the primary content of a webpage
into meaningful sections.
Code:
<main>
<section>
<h2>Courses</h2>
<p>Learn HTML, CSS, and JavaScript.
</p>
</section>
</main>
Explanation
The <article> element represents
self-contained content
such as blog posts, tutorials, or
news articles.
Code:
<article>
<h2>What is HTML?</h2>
<p>HTML is the foundation of
web development.</p>
</article>
Explanation
The <aside> and <footer> elements are
used for supplementary information and
page-level
details like copyright information.
Code:
<aside>
<p>Related Courses</p>
</aside>
<footer>
<p>© 2026 HackForge Academy</p>
</footer>