Semantic HTML means using elements that clearly describe their meaning. Instead of using <div> for everything, use elements like <header>, <nav>, <main>, and <footer>.
Why Use Semantic HTML?
- Accessibility — Screen readers understand the page structure
- SEO — Search engines can better index your content
- Maintainability — Code is easier to read and understand
Common Semantic Elements
<header>— page or section header<nav>— navigation links<main>— main content<section>— thematic section<article>— independent content<aside>— sidebar content<footer>— page or section footer<figure>and<figcaption>— images with captions