web · Level 2
HTML: build a meaningful, accessible page
Write a real web page by hand, check it with the W3C validator and your keyboard, and learn to review the HTML an AI assistant gives you.

Start with the essentials
The short answer
Write HTML that says what things are: a page title, headings in order, landmarks such as header, nav, main and footer, lists, labelled form controls, real buttons and links, and meaningful alt text. Browsers, screen readers and search engines read that structure. Check it with the W3C Nu Html Checker, a keyboard-only pass and a contrast test, knowing that tools alone cannot judge accessibility.
What you will learn
- You will be able to write a valid HTML page with a language, title, headings, landmarks, lists, links, an image, a data table and a labelled form.
- You will be able to choose the right element for the job, and explain why a
divis not a heading, a list or a button. - You will be able to check a page with the W3C Nu Html Checker, read its messages and say what it cannot see.
- You will be able to test a page with the keyboard alone and with a colour contrast calculation.
- You will be able to say what WCAG 2.2 is, which of its criteria this course exercises, and why these checks do not make a page "WCAG compliant".
- You will be able to review HTML that an AI assistant generated and find its common faults.
Who it is for
Beginners to web pages, comfortable with a computer, a text editor and a browser, who want to write a real page by hand and understand what an AI assistant produces when it is asked for one. No JavaScript and no frameworks are used, and CSS only lightly.
Before you start
- None. You need a computer, a plain text editor and a web browser.
Keep learning
The complete workbook
This workbook teaches HTML as structure and meaning, not looks. You will build a small invented community event page with a heading outline, navigation, an image, a programme table and a sign-up form that sends nothing anywhere, then check it with the W3C Nu Html Checker, your keyboard and a colour contrast calculation. You will also learn what WCAG 2.2 is and how to review HTML written by an AI assistant.
- 01Meaning first: the smallest valid pageIn the workbook · 1 exercise
HTML says what each part of a page is. Write the smallest valid page, then meet the checker.
- 02Build the event pageIn the workbook · 1 exercise
Type in a small, real page for an invented community event, then see why each part is there.
- 03Links, images and tablesIn the workbook · 1 exercise
Vague links, useless alt text and fake tables are three easy faults to make.
- 04Forms and buttonsIn the workbook · 1 exercise
A form is where people give you something, so every control must say what it is for.
- 05Test it like a userIn the workbook · 1 exercise
Tools find some problems. Your own hands and eyes find others.
- 06WCAG 2.2, and reviewing what an assistant writesIn the workbook · 1 exercise
Put a name to what you have been checking, then use it on HTML you did not write.
Also inside: a 10-point checklist, a glossary of 11 terms and 10 questions and answers to test yourself. 6 hands-on exercises, each with a worked answer at the back where the workbook gives one.
No login, no card, no account. Before the download we ask you to follow Mickai (two quick links). Free to download and use for personal learning, study groups and inside your own team. Please do not resell the workbooks or republish them as your own. Link people to trust-agent.ai instead.
Test yourself
Questions and answers
What is semantic HTML?
HTML that uses the element matching the meaning of the content: h1 for a main heading, nav for a menu, button for a button, table for data. Browsers, screen readers and search engines can then tell what each part is. A div or span says nothing, so use one only when no meaningful element fits.
Does valid HTML mean an accessible page?
No. The Nu Html Checker tests whether markup follows the rules, not whether it is meaningful or usable. In this workbook's tests a snippet built mostly from divs, a form with no labels and an image with a useless alt text all passed with no messages. Use the checker to catch mistakes, then test with a keyboard and read the accessibility tree.
When should alt be empty?
When the image adds nothing the page does not already say, such as a decorative flourish, or an icon beside text that says the same. Write alt="", with the attribute present, so software skips it. Never leave the attribute out, and never use an empty alt for an image that carries information or is the only content of a link.
What should link text say?
Where the link goes or what it does, in words that make sense when read alone, such as "See the programme". Avoid "click here": people using screen readers can pull up a list of a page's links, and a list of identical vague phrases tells them nothing.
Should I use a link or a button?
Use a link (a with href) to go to another page or another place on the page. Use a button to do something on the current page. Real links and buttons can be reached with Tab and operated from the keyboard without extra work, and a div styled to look like one cannot. Add type="button" unless the button should submit a form.
Why does my form do nothing?
A form only gathers what someone types. To receive it, a program on a web server must be listening at the address the form sends to, and this workbook does not build one. The practice form's button is type="button" for that reason. Do not put a form on a public page unless you know where its data goes, and never test with real personal details.
How do I test a page with only a keyboard?
Put the mouse aside. Press Tab to move through links and controls, Shift and Tab to go back, Enter for links and buttons, Space for buttons and tick boxes, and the arrow keys inside radio groups. Check that everything is reachable, that the order follows the reading order and that you can always see where the focus is.
How much contrast does text need?
WCAG 2.2 level AA asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18 point, or 14 point bold). The ratio runs from 1:1 to 21:1 and is worked out from the brightness of the two colours. Use a contrast tool: grey #777777 on white is 4.48:1, so it just fails.
What is WCAG 2.2, and can I call my page compliant?
WCAG 2.2 is the W3C's web accessibility standard, a W3C Recommendation since 2023. Conformance means meeting every relevant criterion at a chosen level for whole pages, judged by people as well as tools. The checks in this workbook cover only some criteria, so say what you tested instead of claiming compliance. UK public sector bodies should read GOV.UK's guidance.
Can I trust HTML written by an AI assistant?
Treat it as a draft. It can be valid and plausible while still using divs for everything, missing labels, giving vague alt text or choosing headings for their size. Run the checker, read the accessibility tree, press Tab through the page and check contrast before you use it. Never paste passwords, keys or other people's data into a prompt.
When you have finished
Get your certificate of completion
Type your name and download a certificate for this workbook as a PDF, ready to print or to add to LinkedIn. It is made on your own device, so your name is never sent to us. It is a self-declared certificate, not an accredited qualification.
Learn the language
Key terms
- HTML
- HyperText Markup Language: text with tags that says what each part of a page is.
- Element and tag
- A tag such as
<p>marks the start or end of an element, one piece of a page with a meaning. - Semantic element
- An element whose name says what it is, such as
nav,main,h1ortable, as opposed to the genericdivandspan. - Landmark
- A region of a page, such as banner, navigation, main or contentinfo, that assistive technology can jump to.
header,nav,mainandfootercreate them. - Accessibility tree
- The browser's model of a page's items, with a name, role and state for each. Screen readers and other assistive technology use it.
- Alt text
- The
altattribute: text that replaces an image for people and software that cannot see it. An emptyalt=""marks an image that adds nothing.
6 of the workbook's 11 terms. The complete glossary is in the workbook.
Follow the evidence
Sources and checks
Facts last checked: .
Examples in this workbook were run on: Microsoft Edge 153.0.4234.48 (system install) driven by Playwright 1.59.0 for Python 3.12.10 on Windows 11 Pro; HTML and CSS checked with the W3C Nu Html Checker online service (validator.w3.org/nu, checker version 26.9.16) through its JSON API and the form submission its web page uses (2026-09-26).
These workbooks use AI assistance. See how the workbooks are made.
- Web Content Accessibility Guidelines (WCAG) 2.2W3C
- WCAG 2 OverviewW3C Web Accessibility Initiative
- What's New in WCAG 2.2W3C Web Accessibility Initiative
- Page Structure TutorialW3C Web Accessibility Initiative
- Page RegionsW3C Web Accessibility Initiative
- HeadingsW3C Web Accessibility Initiative
- Images TutorialW3C Web Accessibility Initiative
- An alt Decision TreeW3C Web Accessibility Initiative
- Tables TutorialW3C Web Accessibility Initiative
- Caption & SummaryW3C Web Accessibility Initiative
- Forms TutorialW3C Web Accessibility Initiative
- Labeling ControlsW3C Web Accessibility Initiative
- Grouping ControlsW3C Web Accessibility Initiative
- Easy Checks: A First Review of Web AccessibilityW3C Web Accessibility Initiative
- Page Title (Easy Checks)W3C Web Accessibility Initiative
- Language (Easy Checks)W3C Web Accessibility Initiative
- Visible Keyboard Focus (Easy Checks)W3C Web Accessibility Initiative
- Color Contrast (Easy Checks)W3C Web Accessibility Initiative
- Zoom Levels (Easy Checks)W3C Web Accessibility Initiative
- Selecting Web Accessibility Evaluation ToolsW3C Web Accessibility Initiative
- Nu Html Checker (web service)W3C
- About the Nu Html CheckerW3C
- The Nu Html Checker (vnu)Nu Html Checker project
- Service: Input: POST body (Nu Html Checker wiki)Nu Html Checker project, GitHub
- HTML: A good basis for accessibilityMDN Web Docs
- Accessibility treeMDN Web Docs
- DoctypeMDN Web Docs
- The Metadata element: metaMDN Web Docs
- The meta name="viewport" attribute valueMDN Web Docs
- The Image Embed element: imgMDN Web Docs
- The Form Label element: labelMDN Web Docs
- The HTML Input element: inputMDN Web Docs
- The Button element: buttonMDN Web Docs
- CSS length (including the rem unit)MDN Web Docs
- The Content Division element: divMDN Web Docs
- HTML section heading elements (h1 to h6)MDN Web Docs
- HTML Standard: Grouping content (the main element)WHATWG
- HTML Standard: Document metadata (the title element and character encoding)WHATWG
- HTML Standard: Images (text alternatives)WHATWG
- HTML Standard: Form control infrastructure (implicit submission)WHATWG
- Understanding accessibility requirements for public sector bodiesGOV.UK, Government Digital Service and Central Digital and Data Office
- Testing for accessibilityGOV.UK Service Manual
- Test accessibility using the Accessibility tabMicrosoft Learn, Microsoft Edge developer documentation
Created by Mickarle Wagstaff-Irons - Micky Irons with the Mickai team. Published by Mickai LTD. Last updated 26 September 2026.
NextKeep going
Where to go next
Recommended for you
Build and launch a website with AI
Plan a simple site, have AI write the HTML and CSS, understand and check the code, then publish it free with HTTPS and sound search, accessibility and privacy basics.
Recommended for you
Host a chatbot on your website, safely
Put a chatbot on your site without leaking keys or running up bills: server function, limits, CORS, privacy, accessibility, fallbacks, monitoring and a launch checklist.