Interview Question

What are semantic elements in HTML5?

HTML5 semantic elements give page sections meaningful names.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

HTML5 semantic elements describe the meaning of page sections. • Examples include `<header>`, `<nav>`, `<main>`, `<article>`, and `<footer>`. • They improve code clarity and accessibility. • Use them instead of a generic div when their meaning fits.

💡 Simple Example

<main><article><h1>Story</h1></article></main>

⚡ Quick Revision

HTML5 semantic elements give page sections meaningful names.