Chapter 02 of 09Part 1 · The page

Semantic HTML: structure that means something

Choosing the element that says what content is, so browsers, screen readers and search engines understand the page.

9 minBy Zuzo StudioUpdated

9 min

In this chapter you will

  • mark up a page with header, nav, main, section and footer
  • build a heading outline that never skips a level
  • choose between a link and a button, and label every form field

Before you startThis builds on What happens when you type a URL.

Check your understanding

3 questions

Q1A design shows a small grey label above each card. It looks like a heading but is smaller than the body text. Which element should it be?

Show the answer

The heading level that fits its place in the outline, styled small in CSS The level comes from the structure of the page. Size is a styling decision, so CSS can make an h3 as small as the design needs.

Q2Clicking "Menu" opens a navigation panel on the same page. What should "Menu" be?

Show the answer

A button element Opening a panel is an action on the current page. A button is focusable, works with Space and Enter, and is announced as a button.

Q3What does adding role="button" to a div change?

Show the answer

It changes what screen readers announce, and nothing else The role is a promise to assistive technology. The behaviour has to be built separately, which is why a real button is the better choice.

Key takeaways

  1. Semantic HTML uses the element that describes what content is, not how it looks.
  2. Landmarks such as header, nav, main and footer let screen reader users jump around a page.
  3. Use one h1, never skip heading levels, and set text size in CSS rather than by picking a heading.
  4. A link goes somewhere and a button does something; a clickable div is neither.
  5. Reach for a native HTML element first and add ARIA only for what HTML cannot express.
Up next · Chapter 03 · 11 min The cascade and the CSS box model How CSS decides which rule wins, and how big every box really is once padding, border and margin are added.

02FAQ

Questions on this chapter

Something else on your mind? Email the studio and a designer, not a salesperson, replies within a day.

What is semantic HTML?

Semantic HTML is markup that uses elements for their meaning: headings for headings, lists for lists, nav for navigation, button for buttons. It lets browsers, screen readers and search engines understand the page without guessing from its appearance.

Does semantic HTML help SEO?

It helps search engines understand a page: a clear heading outline and a main element show what the page is about and where the content is. It is not a ranking trick on its own, but it removes guesswork, and it makes the page accessible, which matters to every visitor.