Reading a page's structure (HTML)
A page has a plan under its paint: a tree of parts with names and labels. Reading that plan shows why a keyboard cannot reach a button and how an automated check finds things.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a house plan. A plan shows rooms, doors and windows, but paint and furniture come later and are not on the plan. A builder reads the plan to know what is where, and a visitor never sees it.
A web page has a plan too. Daily List is a to-do list app. Under the colours and fonts, the page is a list of parts: a heading, a box for the title, a button, a list of tasks. The plan is written in , and each part is an element. Extra labels on a part are its attributes.
Tom, the tester, uses the tools in his browser to look at the plan. He right-clicks the Save button and chooses Inspect. He expects to see a button, but he sees a plain box with the word Save on it.
That explains a complaint, because Lily uses the keyboard and the Tab key skips the Save button. In this example the plain box has no added keyboard behavior. An enabled native button supplies button semantics and keyboard behavior; a disabled or hidden button may not take focus. A custom control can work too, but its author must supply and test the required semantics and interaction.
The plan picture has a limit. A house plan does not change while you live there. Small programs can change a page plan while the page is open. So the plan you see now may differ from the one it loaded with.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Reading the plan under a page: what each part is, what labels it carries, and whether it is the right kind.
- Is it the right kind?
- Does it have the right label?
- Is its name stable?
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| House plan | HTML |
| A room or a door | Element |
| A label on a door | Attribute |
| Paint and furniture | Style |
WHERE THIS PICTURE STOPS
- A house plan does not change while you live there. A page plan can be changed by programs while open.
- A door is a door. A box can look like a button and not be one.
- Paint is outside the plan. In a page, style files are separate from the markup.
HOOK
Right kind, right label, right name.
REMEMBER IT THIS WAY
A contrast: two neighbours told apart by one test.
Tom sees a box dressed as Save, but the fixture has no keyboard handling. Inspect semantics and test behavior, not appearance alone.
| In the trick | What it stands for |
|---|---|
| Button | an element that is a button |
| Plain box | a plain box with the word Save on it |
TELL A FRIEND
A house plan shows rooms and doors, and paint comes later. A page plan shows parts and labels, and style comes later.
OFTEN MIXED UP WITH Browser developer tools. The tools lesson shows how to open . This lesson reads what inspect element shows.
PRACTISE AND KEEP
Sources for this topic — 16 sources
- Market practice
Basic HyperText Markup Language (HTML) syntax (Mozilla developer docs, Learn web development) ↗ — Mozilla (developer documentation) · An element has an opening tag, content and a closing tag; attributes hold extra information written as a name, an equals sign and a quoted value (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
HyperText Markup Language (HTML): a good basis for accessibility (Mozilla developer docs, Learn web development) ↗ — Mozilla (developer documentation) · A real button element works with the keyboard and screen readers without extra work, while a plain box made to look like a button needs focus, a role and key handling added by hand (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Anatomy of the Document Object Model (DOM) (Mozilla developer docs) ↗ — Mozilla (developer documentation) · The browser parses markup into a tree of nodes; each node has one parent except the root (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Locator strategies (Selenium documentation) ↗ — Selenium project · Elements can be found by id, name, Cascading Style Sheets selector or XPath; ids should be unique on a page (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Waiting strategies (Selenium documentation) ↗ — Selenium project · An implicit wait is a session-wide setting and an explicit wait polls for one condition; mixing them can cause unpredictable waits (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Understanding common errors (Selenium documentation) ↗ — Selenium project · A stale element reference means the element is no longer attached to the page, usually because it was drawn again; find it again each time it is used (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
The iframe element (Mozilla developer docs, HTML reference) ↗ — Mozilla (developer documentation) · An iframe embeds another document inside the current page (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
An alt Decision Tree (W3C Web Accessibility Initiative images tutorial) ↗ — World Wide Web Consortium (W3C) · W3C Web Accessibility Initiative tutorial on text alternatives for images (registry entry)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
HTML Living Standard — syntax and id author rules ↗ — WHATWG · 13.1.2 intro and complete13.1.2.1–13.1.2.4: start/end tags, attributes, optional tags; separately complete id author-conformance paragraph/notes at https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute. id uniqueness is per element tree.
Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.
- Market practice
Introduction to the DOM ↗ — Mozilla · Complete DOM introduction and examples read: document/node/element interfaces and live programmatic tree; not painted pixels or a verbatim source copy.
Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.
- Market practice
WAI ARIA Authoring Practices — button and link patterns ↗ — World Wide Web Consortium · Complete button pattern and complete linked https://www.w3.org/WAI/ARIA/apg/patterns/link/: button Enter/Space versus link Enter, focus/roles/notes. Authoring guidance, not a normative WCAG conformance certificate.
Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.
- Market practice
WebDriver2 Working Draft, 2 July 2026 — elements ↗ — World Wide Web Consortium · Complete status/front matter and chapter12 element introduction plus12.1 interactability. Stale if node document not active or node disconnected. Working Draft, not Recommendation; Selenium exceptions were not executed.
Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.
- Market practice
Selectors Level4 — relational pseudo-class ↗ — World Wide Web Consortium · Complete section4.5 :has(), examples/notes/restrictions read7November2026; ancestor matches can depend on descendants. Draft section, not all-engine support or whole-spec certification.
Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.
- Market practice
Locators (Playwright documentation) ↗ — Microsoft (Playwright) · Complete Locate in Shadow DOM section: default locators pierce open roots; XPath does not, closed roots unsupported. Vendor-specific behavior.
Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.
- Market practice
Web Content Accessibility Guidelines2.2, Recommendation12 December 2024 ↗ — World Wide Web Consortium · Pinned WCAG2.2 Recommendation12December2024 complete SC1.1.1 with notes/exceptions: alternatives for informative content; decorative content can be ignored. Not all-WCAG review.
Relevant public sections reviewed 6 November 2026 for V11 BA agile/product. See applicability for exact version, scope and access limitations.
- Official requirement
HTML Living Standard — parsing HTML documents (5 November 2026 snapshot) ↗ — WHATWG · HTML Living Standard section 13.2.2: parse errors and normative parsing rules; optional end tags must be checked separately.
Opened relevant primary passages on6November2026 via normal web search and document view. Section13.2.2 parse errors and normative processing rules opened; informative error-code table distinguished. Optional-end-tag syntax must be checked separately.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.