DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • Semantic HTML
  • Accessibility (a11y)
  • Forms & Validation
  • Document Metadata & The <head>
  • The Document Object Model (DOM)
  • Character Encoding & Entities
  • Data Attributes & Custom Data
  • Template, Slot & Web Components
  • Responsive Images: Picture, Source & srcset
  • Loading Strategies & Resource Hints
  • The Native Dialog Element
  • Audio, Video & Media APIs
  • SVG Integration & Canvas Basics
  • Advanced Input Types & Datalist
  • Details, Summary, Progress & Meter
  • Global Attributes & Iframe Security
  • Microdata, Schema.org & Structured Data
  • Open Graph & Social Meta Tags
  • Security Headers & CSP in HTML
  • Link Relations & Canonical Tags
← From Beginner to Expert in Fundamentals of Frontend

Semantic HTML

25 min read
Semantic HTML<main><article><nav><aside>Div SoupSEO

Beyond Div Soup

Semantic HTML means using the right element for the right job. It's not just about structure — it's about meaning. Screen readers, search engines, and AI crawlers all rely on semantic markup to understand your page.

Key Semantic Elements

  • <header> — Introductory content or navigation
  • <nav> — Navigation links
  • <main> — Primary content (only one per page)
  • <article> — Self-contained, independently distributable content
  • <section> — Thematic grouping of content
  • <aside> — Tangentially related content (sidebars)
  • <footer> — Footer content

Why It Matters

Google's search algorithm gives higher rankings to semantically structured pages. Screen readers use landmarks (<nav>, <main>) to let users jump between sections. Without them, visually impaired users must listen to the entire page linearly.

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.