
A workshop page has to offer a title, a schedule, and an easy way to reach its practical details. Those needs already point toward the right HTML. Settle what the document means first, and only then decide where the boxes go.
Create a complete document
Any plain text editor and modern web browser will work here. Because the downloadable file carries a .txt suffix, you can inspect the source first, rename it with an .html extension, and open workshop.html directly without installing a build tool or package manager.
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Saturday web workshop</title>
<style>
body { max-width: 44rem; margin: 2rem auto; padding: 0 1rem;
font: 1.1rem/1.6 system-ui, sans-serif; color: #28232a; }
a { color: #442160; }
:focus-visible { outline: 3px solid #442160; outline-offset: 4px; }
nav { display: flex; flex-wrap: wrap; gap: 1rem; }
</style>
</head>
<body>
<a href="#content">Skip to workshop information</a>
<header>
<p>Practice club</p>
<nav aria-label="Workshop sections">
<a href="#schedule">Schedule</a>
<a href="#details">Practical details</a>
</nav>
</header>
<main id="content">
<h1>Saturday web workshop</h1>
<p>A fictional workshop for practicing accessible HTML.</p>
<section id="schedule">
<h2>Schedule</h2>
<ol>
<li>Build a document with a useful heading outline.</li>
<li>Test navigation with a keyboard.</li>
</ol>
</section>
<section id="details">
<h2>Practical details</h2>
<p>Bring a laptop, a text editor, and a modern browser.</p>
<p>This is sample content, not an event registration page.</p>
</section>
</main>
<footer><p>Save your completed page so you can compare later changes.</p></footer>
</body>
</html>
Follow the reading order
The page has one main heading (<h1>), followed by level-two headings (<h2>) for the schedule and practical details. The visual order is also the DOM source order. If you comment out the <style> block completely, the page still reads top-to-bottom in a logical sequence. That is a reliable early check because CSS layout rules cannot repair an incoherent document outline or fix skipped heading levels (<h1> jumping straight to <h4>).
Scroll sideways if the columns extend beyond the frame.
HTML element in workshop.html |
Default landmark or role exposed to assistive tech | Why it is chosen here instead of a generic <div> or <span> |
|---|---|---|
<header> (direct child of <body>) |
banner landmark |
Identifies the site-level or page-level introductory region before <main> |
<nav aria-label="Workshop sections"> |
navigation landmark (named "Workshop sections") |
Distinguishes this navigation group if a page later adds a second <nav> in the footer or sidebar |
<main id="content"> |
main landmark (one visible per document) |
Marks the primary content target for the "Skip to workshop information" link and screen-reader shortcuts |
<section id="schedule"> |
Generic section (or region landmark when explicitly named via aria-labelledby) |
Groups a thematic part of the document that starts with its own <h2> heading |
<ol> |
Ordered list (list with numbered listitem children) |
Communicates that step 1 comes before step 2 in the workshop sequence |
<footer> (direct child of <body>) |
contentinfo landmark |
Holds closing document metadata and notes outside <main> |
header introduces the page. nav groups the two in-page navigation links. main contains the primary content, and footer holds the closing note. A section groups a distinct topic that has a natural heading; it is not a universal replacement for div. When you need a wrapper purely to arrange columns or apply a background color, a plain <div> is the right element so you do not clutter the document structure with meaningless sections.
The schedule uses an ordered list (<ol>) because sequence matters; if the order of items could be shuffled without changing the meaning, an unordered list (<ul>) would be appropriate. Notice also that the HTML <address> element is reserved for contact information for the nearest <article> or <body> ancestor—not for arbitrary physical venue descriptions unless they serve as contact details for the document.
Test links with the keyboard
Click the address bar, then press Tab repeatedly without touching the mouse. The skip link (<a href="#content">), "Schedule", and "Practical details" should each receive the 3-pixel #442160 focus ring defined by :focus-visible. Press Enter while "Practical details" is focused: the browser URL should update to end with #details, and the viewport (and sequential keyboard focus starting point) should move to <section id="details">. For a fragment link (href="#details") to work, the target id="details" must exist in the document and be unique across the entire page.
Choose interactive elements by what they do, not how they look. Use <a href="..."> when activation navigates to a URL or a document fragment; use <button type="button"> when activation triggers an in-page action (such as opening a dialog or clearing a filter). Attaching a click listener to a <div> or <span> omits keyboard focus (tabindex), Enter/Space activation, and the accessible role that native links and buttons provide out of the box.
The root <html lang="en-US"> element tells screen readers and translation tools which pronunciation and language rules apply to the document text. Inside <head>, <meta name="viewport" content="width=device-width, initial-scale=1"> prevents mobile browsers from rendering the page inside a virtual desktop canvas and shrinking the text. The example leaves out maximum-scale=1 and user-scalable=no so it does not attempt to restrict zoom for readers with low vision.
Check narrow screens and zoom
Open your browser’s developer tools, set the viewport width to 375 pixels, and zoom the page to 200%. Since body uses max-width: 44rem rather than a fixed pixel width, and nav uses flex-wrap: wrap, the navigation links drop to a second line and no horizontal scrollbar appears (document.documentElement.scrollWidth <= window.innerWidth). Avoid assigning a fixed height to boxes holding body prose: if someone increases their operating system font size or opens the layout on a narrow screen, rigid containers will clip or overlap the wrapped lines.
The visual layout here is deliberately minimal. A later version could use CSS Grid for a project gallery. Before you layer on JavaScript DOM interactions, make sure the core structure and text are already present in the initial HTML.
Make one meaningful change
Add a third item to the <ol> schedule and a new <section id="preparation"> with an <h2>Preparation</h2> heading describing what software to install beforehand. If you add a third link (<a href="#preparation">Preparation</a>) inside <nav>, test it with Tab and Enter to confirm the fragment jump works. If you add a subsection inside "Schedule", give it an <h3>—choose the heading level strictly from the outline hierarchy (h1 to h2 to h3), never from the font size you want on screen.
Finished when: the document still reads coherently with CSS disabled, every fragment link points to a unique id attribute, each link shows a clear keyboard focus indicator, and visual reading order aligns with the DOM source.
Source: MDN HTML element reference and WAI-ARIA Landmark Roles describe document landmarks and content sections.
Download the complete example. Save the file before running it; the guide above names the required runtime.
Keep building
- CSS Grid: a responsive project gallery
Build a gallery that changes columns without brittle breakpoints, then test long titles and narrow screens.
- JavaScript DOM manipulation: an accessible task list
Create, complete, and remove tasks with native controls, safe text insertion, and an announced count.
- JavaScript fetch: handle HTTP errors and cancellation
Read a local JSON file, distinguish a failed request from a failed HTTP response, and cancel stale work.