Thuta Learning
HTML
ProjectsWeb DevelopmentBeginner

Final Checklist

HTMLLesson 3630 min

What you'll walk away with

  • Confirm that the doctype, lang, charset, viewport and title are all present
  • Run structure checks: one h1, no skipped heading levels, and landmarks
  • Tell apart the errors a validator catches from those only a human finds
  • Run keyboard, 320px-width and 200% zoom tests in a fixed order

Explain it simply

Explain it simply

However experienced they are, pilots read a checklist line by line before every take-off, because memory is unreliable under pressure. Launching a website works the same way. A page that looks good on your own screen has not yet proven that it is a good page.

This lesson turns everything from the HTML lessons into one list of checks. It takes about five minutes at first, and with practice you will run it on every page almost without thinking.

Problem → Why → Solution

The problem: a bakery page that works on my machine

Open the page below in a desktop browser and the heading, image, link and email box all appear. The developer sends a screenshot and says "done". Yet about ten problems are hiding in it.

There is no doctype, so the browser renders in quirks mode. There is no viewport tag, so on a phone the text shrinks to a tiny zoomed-out view. The image has no alt, the link text says "Click here", and the email box has neither a label nor a name. For a screen reader user this page is a puzzle.

bakery-before.html
<html>
<head>
  <title>Home</title>
</head>
<body>
  <div class="top"><b>Golden Crust Bakery</b></div>
  <h1>Fresh bread every morning</h1>
  <h1>Our breads</h1>
  <img src="sourdough.jpg">
  <h4>Opening hours</h4>
  <p>Mon-Sat, 7am-6pm. <a href="/menu.html">Click here</a></p>
  <input type="email" placeholder="Email for news">
  <button>Join</button>
</body>
</html>

Why a screenshot is not enough

A screenshot shows one screen size, one browser and one mouse user. Heading order, alt text, label links, keyboard focus and quirks mode are all invisible in a picture. That is why you check the code itself, run tools on it and operate it with a keyboard.

Core concept: check in five layers

Work through the checklist layer by layer, from the bottom up, because checking an upper layer is wasted effort while a lower one is broken. Without a doctype, for example, any layout test is meaningless: the browser is drawing the page in quirks mode.

1. Document

You need <!DOCTYPE html> first, lang on the html tag, and inside head a meta charset="UTF-8", a viewport meta and a title that describes this page. The title appears in tabs, bookmarks and search results, so it must say more than "Home".

2. Structure

One h1 states what the page is about, h2 splits it into sections, and h3 divides those sections. Never jump from h2 to h4. The header, nav, main and footer landmarks let screen reader users jump straight between regions.

3. Content

Every meaningful image needs alt text that says what it shows, and purely decorative images get alt="". Link text must say where it goes. Click every link and confirm none leads to a 404.

4. Forms

Every control needs a connected label, a name and the right type. Submit the form empty and with bad data, and confirm that error messages appear.

5. Small screens and keyboard

Narrow the browser to 320px: there must be no sideways scrolling. At 200% zoom, text must not overlap. Finally put the mouse aside and use only Tab to reach every link and button, confirming you can always see the focus ring.

ToolCatchesMisses
W3C Nu validatorMissing doctype, missing alt, duplicate idUseless alt such as alt="image"
Lighthouse / axeMissing labels, low contrastWhether heading text makes sense
Keyboard + zoomLost focus, overlapping textMarkup errors
Mental model: foundation up to roof
  1. Is the document head complete?
  2. Are headings and landmarks right?
  3. Do images, links, forms make sense?
  4. Does it work on phone, zoom, keys?

For each problem you find, write down how to reproduce it, how severe it is and how you verified the fix.

General pattern

html
<!DOCTYPE html>
<html lang="language-code">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page topic | Site name</title>
  <meta name="description" content="One-sentence summary of this page">
</head>
<body>
  <!-- header, nav, main with exactly one h1, footer -->
</body>
</html>

This is the document layer of the checklist written as code. Replace lang with the page's language, such as en or my. The description is a summary that search engines may show under your title.

Starter template: a shell that passes layers 1 and 2

Start every new project from this template instead of an empty file. The document layer (doctype, lang, charset, viewport, title) is already complete, and it has header and main landmarks with a single h1, so the two lowest layers of the checklist pass from the first minute.

html
<!-- A clean starter template -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Clean HTML Page</title>
</head>
<body>
  <header>
    <h1>My Website</h1>
  </header>
  <main>
    <p>Start building from here.</p>
  </main>
</body>
</html>

Code breakdown

  1. Comment before the doctype<!-- A clean starter template -->

    The HTML spec allows comments before the doctype, and modern browsers stay in standards mode. Even so, putting the doctype on the very first line is the simpler and safer habit.

  2. Standards mode<!DOCTYPE html>

    Without this line document.compatMode is "BackCompat" (quirks mode), and box sizes and table layout follow old-browser rules. With it, compatMode is "CSS1Compat".

  3. Language<html lang="en">

    Screen readers use this value to choose a pronunciation voice, and browsers use it to decide whether to offer translation. For a Myanmar page, change it to lang="my".

  4. Phone-friendly width<meta name="viewport" content="width=device-width, initial-scale=1.0">

    Without it, phone browsers lay the page out at a desktop-like width of about 980px and shrink it, so the text becomes tiny. This line says to use the device's real width.

  5. One h1 inside a landmark<h1>My Website</h1>

    In the template the h1 sits inside header. On real pages the h1 usually moves into main as that page's own title, such as "Our breads", while the site name becomes a plain link or logo.

You should see
A white page showing the large bold heading "My Website" with the paragraph "Start building from here." below it. The browser tab reads "My Clean HTML Page", and the page renders in standards mode.

How to write an issue report

A checklist only finds problems; to get them fixed you must record them so someone else, or you next week, can understand them. "The form is bad" is impossible to act on. A good report states where, how to reproduce it, what you expected and how severe it is.

text
Page:      /index.html (bakery home)
Layer:     4. Forms
Steps:     Tab to the email box, turn on a screen reader
Expected:  "Email for news, edit text"
Actual:    "edit text" (no label; placeholder only)
Severity:  High - blind visitors cannot tell what the field is for
Fix check: label for="news-email" added; re-tested with the screen reader

In real projects

In real projects

Teams paste this checklist into their pull request template, and a reviewer ticks each item before merging. The automated part runs in CI: an HTML validator, Lighthouse and a broken-link checker run on every commit, and the build fails when a score drops.

Tools only catch part of the accessibility problems, though. alt="photo" passes the validator and still tells a blind visitor nothing. So before a release someone does a manual pass: opening the page on a real phone, using it with the keyboard and listening to it with a screen reader. For pages that get shared on social media, the team also checks the link preview: title, description and image.

Common mistakes

Common mistakes

Calling it done when the validator is green

A validator checks syntax and required attributes only. alt="img_0042", ten links that all say "Read more", or an h1 holding nothing but a logo image all pass it. Treat a tool's result as the starting point and read the content yourself.

Testing only with a desktop mouse

Most developers test on a large monitor with a mouse, while most visitors arrive on a phone and some use only a keyboard. Sideways scrolling, an invisible focus ring and div buttons that ignore Enter only show up in the 320px and Tab tests.

Picking headings by font size

Using an h4 right under an h1 because "h4 looks nicely small" breaks the outline. The heading level states rank in the document; change the size with CSS instead.

Best practices

Making the checklist pay off

  • Do not save the whole check for the end of a project; check layers 1 and 2 as soon as you add each new page
  • Keep the checklist as a text file inside the project folder so the whole team uses the same version
  • When the same kind of bug shows up twice, add a new checklist item that would have caught it
  • Keep the starter template up to date and begin every new project from it

Mini challenge

Fix the bakery page with the checklist

Run the bakery page from the Problem section through all five checklist layers and write a version with every problem fixed. Keep the content the same: the bakery name, opening hours, menu link and newsletter sign-up.

  • Add the doctype, lang, charset, viewport and a descriptive title
  • Add header, main and footer, with one h1 and h2 for the rest
  • Give the image alt text and make the link text say where it goes
  • Turn the newsletter into a form with a label, name, required, action and method
bakery-after.html
<!DOCTYPE html>
<!-- TODO: lang on <html> -->
<html>
<head>
  <!-- TODO: charset, viewport, a title naming the bakery -->
</head>
<body>
  <!-- TODO: header landmark with the bakery name (not a bold div) -->
  <!-- TODO: main: exactly one h1, then h2 sections (no jump to h4) -->
  <!-- TODO: img with alt describing the bread, plus width/height -->
  <!-- TODO: link text that names the destination (no "Click here") -->
  <!-- TODO: newsletter form: label, name, type="email", required -->
  <!-- TODO: footer -->
</body>
</html>

Expected: The page renders in standards mode with exactly one h1 and two h2 headings. The image has alt text and the email field has a connected label. Pressing Join with an empty email is blocked by the browser.

Show hint

The bakery name is the whole site's name, so it can live in header as a plain paragraph or link while "Fresh bread every morning" becomes the h1. "Our breads" and "Opening hours" then become h2.

Show solution
bakery-after.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Golden Crust Bakery | Fresh bread every morning</title>
  <meta name="description" content="Sourdough and fresh loaves, baked daily.">
</head>
<body>
  <header>
    <p><a href="/">Golden Crust Bakery</a></p>
  </header>
  <main>
    <h1>Fresh bread every morning</h1>

    <h2>Our breads</h2>
    <img src="sourdough.jpg" width="600" height="400"
         alt="Round sourdough loaf with a dark, crackled crust">
    <p><a href="/menu.html">See the full bread menu and prices</a></p>

    <h2>Opening hours</h2>
    <p>Monday to Saturday, 7am to 6pm.</p>

    <form action="/newsletter" method="post">
      <label for="news-email">Email for bakery news</label>
      <input id="news-email" name="email" type="email" autocomplete="email" required>
      <button type="submit">Join</button>
    </form>
  </main>
  <footer>
    <p>Golden Crust Bakery, 12 Market Street</p>
  </footer>
</body>
</html>

Quick quiz 1 / 3

If you delete <!DOCTYPE html>, what does document.compatMode return?

Quick quiz 2 / 3

Which of these problems will the W3C validator NOT catch?

Quick quiz 3 / 3

A flower divider image sits between two sections purely as decoration. Which alt is best?

What to remember

  • Check five layers from the bottom up: document, structure, content, forms and small screens
  • Without a doctype you are in quirks mode, so no other layout test can be trusted
  • Validators check syntax, but only a human can judge alt text and link wording
  • Run the 320px, 200% zoom and Tab-key tests before every release
  • Record each problem with reproduce steps, severity and how the fix was verified

HTML Living Standard — WHATWG

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

Final Checklist | Thuta Learning