🌐Semantic HTML
Also known as Semantic Markup, Semantic Elements, HTML5 Semantic Elements
Pick the HTML tag that says what each part is, like nav, main or button.
Think of it like
Think of it like naming the rooms on a house plan. Kitchen and bedroom say more than room one and room two.
Example
Emma swaps her plain div boxes for header, nav, main and footer. A screen reader can now jump straight to her menu.
Why it matters
It makes a site usable with a screen reader and a keyboard. It also helps search engines read the page.
Definition
Example code
html
<nav>
<a href="/">Home</a>
<a href="/menu">Menu</a>
</nav>Common mistake
Key takeaways
- 1Say what it is. Pick the element that names the part.
- 2Free help. Real buttons work with keys by default.
- 3Same look. Meaning changes, the design does not.