8. What is semantic HTML?

Semantic HTML uses elements that communicate the meaning or role of content. Examples include <article>, <nav>, <main>, <header>, and <footer>. Semantic markup improves structure, accessibility, maintainability, and machine understanding.

Key Takeaways
  • Semantics communicate meaning.
  • Prefer meaningful HTML over generic containers when appropriate.
Knowledge Check

Which is a semantic HTML element?