Coffee Clubindex.htmlCoffee ClubHomeBrewTip: grind freshContact us1<div>Coffee Club</div>2<div><a href="/">Home</a></div>3<div>4 <div><h1>Brew</h1></div>5</div>6<div>Tip: grind fresh</div>7<div>Contact us</div>genericgenericgeneric genericgenericgeneric<header><nav><main><article><aside><footer>D
Front left: the page source, seven lines that start as plain divsBack right: the browser, drawing the page (it never changes)Front right: the accessibility tree, where each box's role changesFront left: seven lines of HTML, first written only with div elements. Back right: the page as the browser draws it. Front right: the accessibility tree the browser builds from it. Each step swaps one div for a semantic element: the line changes, a tag chip hops to its tree row, and the row's role changes from generic to banner, navigation, main, article, complementary or contentinfo. The page never changes. Then a D key hops between the five landmarks, as a screen reader user would. Real screen readers also read the heading and the link. The figure shows only the six boxes, so you can follow the roles.

Plain boxes

  1. This small page is built only from div elements. A div is a plain box: it groups content but says nothing about what that content is. The browser draws it fine, yet to a machine every part looks alike.

Naming the parts

Using the meaning

What happens

;; step 1/10 · div-soup
file     index.html   (the body: 7 lines)
  1  <div>Coffee Club</div>
  2  <div><a href="/">Home</a></div>
  3  <div>
  4    <div><h1>Brew</h1></div>
  5  </div>
  6  <div>Tip: grind fresh</div>
  7  <div>Contact us</div>
div      a generic box: no meaning of its own
drawn    five blocks, one under the other

By the browser's default styles, div, header, nav, main, article, aside and footer are all plain blocks: each starts on a new line and takes the full width. Swapping them changes no pixel. Real screen readers also read the heading and the link. The figure shows only the six boxes, so you can follow the roles.