Essential storage keeps sign-in and learning features working. Google Analytics measures visits; Microsoft Clarity records interactions to help us improve usability. Both are optional and stay off until you choose. Read our privacy policy.
Study the question, then follow the complete answer and its reasoning.
01 · QUESTION
What should the HTML contain?
Build a skip link, a labeled primary navigation region, and working fragment links for a one-page workshop guide.
Requirements
Add a skip link to #main-content
Wrap the course links in nav with aria-label=Primary
Link to #schedule and #materials
Give main and both sections matching IDs
Use descriptive link text
Key idea
Every fragment in an href must exactly match one unique id. The skip link should target the main content.
02 · SOLUTION
Complete HTML answer
<a href="#main-content">Skip to main content</a>
<nav aria-label="Primary">
<a href="#schedule">Workshop schedule</a>
<a href="#materials">Required materials</a>
</nav>
<main id="main-content">
<h1>HTML workshop</h1>
<section id="schedule">
<h2>Schedule</h2>
<p>The workshop starts at 10:00.</p>
</section>
<section id="materials">
<h2>Materials</h2>
<p>Bring a laptop and a notebook.</p>
</section>
</main>
03 · EXPLANATION
Why this solution works
The first link lets keyboard users bypass repeated navigation. nav communicates the link group's purpose, and its accessible label distinguishes it from other navigation regions. Each fragment works because its href matches one destination id exactly.
Concepts demonstrated
Create keyboard-friendly skip navigation
Label navigation regions
Connect fragments to unique targets
Why this pattern matters
Keyboard and assistive-technology users should be able to bypass repeated controls and reach meaningful sections quickly. A skip link reduces unnecessary tab stops, a nav landmark exposes a recognizable region, and exact fragment relationships make a long single-page document easier for everyone to explore.
Solution walkthrough
The first link targets main-content and provides a direct route past site navigation.
The nav element groups the two destination links and its label explains their role.
Each link uses destination-oriented text rather than an ambiguous phrase such as Click here.
The main element and both sections expose unique ids matching their incoming href values.
Common mistakes to avoid
Creating a fragment link whose target id does not exist
Repeating an id on multiple sections
Using a button for navigation to another location
EXERCISE FAQ
Before you move on.
What does “Create accessible page navigation” teach?
This beginner HTML exercise focuses on Create keyboard-friendly skip navigation, Label navigation regions, Connect fragments to unique targets. Its requirements define the exact behavior to implement before you write code.
How should I validate this HTML solution?
Start with the displayed example input and expected output, then test a boundary case suggested by the requirements. Edit the HTML, inspect the live preview, then run the checks before comparing your structure with the complete answer.
When should I open the reference solution?
Attempt Create accessible page navigation first. Then open the read-only solution file to compare the contract, edge-case handling, and implementation choices—not simply to copy the final code.