Learn HTML
HTML is more than tags: the elements you choose decide how search engines, screen readers and keyboards understand your page. These quizzes focus on semantics, forms and accessibility.
Covers the HTML Living Standard.
What you will practise
- Choosing semantic elements over generic divs
- Building accessible forms
- Images, links and document structure
- Loading scripts without blocking the page
HTML lesson
A short introduction to the ideas behind the quizzes, before you start practising.
HTML describes the structure and meaning of a page, not its appearance. Choosing the right element, rather than a generic `<div>` for everything, is what makes a page usable with a keyboard, a screen reader and a search engine.
Key concepts
Semantic elements
Elements like `<nav>`, `<main>`, `<header>`, `<article>` and `<button>` describe what a piece of content is, which browsers, assistive technology and search engines all rely on. A styled `<div>` looks the same but carries none of that meaning.
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
</nav>Forms and labels
Every form control needs an associated `<label>`, connected with a matching `for`/`id` pair (or by wrapping the input). This gives the control an accessible name and lets clicking the label focus the field.
<label for="email">Email</label>
<input id="email" name="email" type="email">Headings describe structure, not size
Heading levels (`<h1>`–`<h6>`) should reflect the outline of the page, not how large you want text to look. Skipping levels for visual reasons breaks the document outline that screen-reader users rely on to navigate.
<h1>Article title</h1>
<h2>Section</h2>
<h3>Subsection</h3>Alt text on images
The `alt` attribute describes an image for anyone who cannot see it. A purely decorative image should have `alt=""` so it is skipped; a meaningful image needs a short, specific description.
<img src="chart.png" alt="Sales rising from January to June">Common mistakes
- Using a `<div>` with a click handler instead of a `<button>`, losing keyboard focus and activation for free.
- Leaving an `<img>` without an `alt` attribute, which screen readers may then read out as the raw file name.
- Skipping heading levels to get a particular font size instead of using CSS.
- Placing a placeholder inside an input instead of a real `<label>`, which disappears as soon as the user starts typing.
Quick recap
- Reach for the semantic element that matches the content’s meaning before styling a generic div.
- Connect every form control to a visible label.
- Keep heading levels in document order; use CSS for size.
- Give meaningful images real alt text, and decorative ones an empty alt.
Ready to test this? Take the HTML Basics quiz →
Roadmap
Work through the levels in order, or jump to where you are.
HTML quizzes
Interactive HTML challenges
Hands-on activities: find bugs, complete code, order steps and match concepts.
HTML articles
FAQ
Do I need CSS knowledge first?
No. The HTML quizzes never require styling knowledge.