HTML/CSSQuestion 01 of 14
HTML semantics
Answer out loud or in your head first, then compare.
Answer
A semantic element describes the role of its content, e.g. nav, main, article, button. div and span are generic containers.
HTML
<main>
<article>
<h1>Article title</h1>
<p>Content…</p>
</article>
</main>In practice: I use button for actions and a with href for navigation. Native elements come with useful keyboard behaviour and information for assistive technologies.
Pitfall: swapping every div for a section doesn't make a page semantic. I choose an element for its meaning, not its default look.
How did it go? Be honest — “Not yet” puts the question on your review list.