Semantic HTML uses elements that describe the meaning of the content.
Instead of using only <div> elements, semantic tags explain what each part of the page represents.
Semantic HTML makes webpages easier to understand for browsers, developers, search engines, and screen readers.
These elements describe common parts of a webpage.
<header> — top section of a page or section<nav> — navigation links<main> — main page content<section> — grouped related content<article> — independent content<aside> — side or extra content<footer> — bottom section of a page or sectionThe <header> element usually contains introductory content like a title, logo, or navigation.
The <nav> element contains navigation links.
The <main> element contains the primary content of the webpage.
A page should usually have only one <main> element.
The <section> element groups related content together.
A section usually has a heading that describes the topic.
The <article> element represents independent content that could stand alone.
Blog posts, news posts, and forum posts are common examples.
The <aside> element contains extra content related to the main content.
The <footer> element usually contains copyright, contact links, or page information.
A <div> has no meaning by itself. Semantic elements describe the purpose of the content.
<div> for everything<section> without a clear heading<main> elements on one page<article> for content that cannot stand aloneCreate a semantic webpage using <header>, <nav>, <main>, <section>, <article>, <aside>, and <footer>.
Ask the AI if you need help understanding or want to dive deeper in any topic