Skip to main content

  • Foundations
    • Border radius
    • Breakpoints
    • Colours
    • Colour scheme
    • Elevation
    • Focus and outline
    • Sizing and spacing
    • Layout
    • Motion
    • Typography
    • Z-index
  • Elements
    • Buttons
    • Code
    • Icons
    • Figure and caption
    • Forms
    • Links
    • Lists
    • Media
    • Tables
  • Components
    • Accordion
    • Alerts
    • Avatar
    • Blockquote
    • Breadcrumbs
    • Card
    • Chiplets
    • Details and summary
    • Dialog
    • Empty state
    • Stats
    • Global footer
    • Horizontal rule
    • Kanban
    • Key-value list
    • Meter
    • Objects
    • Pagination
    • Polka background
    • Post-it note
    • Progress
    • Speech bubbles
    • Status dot
    • Skeleton
    • Skip link
    • Spinner
    • Toggles
    • Tooltip
    • Webmentions
  • Patterns
    • Article header
    • Author card
    • App list and app sheet
    • Error page
    • Related posts
    • Search results
    • Utilities

John Peart

  • Search
  • Menu
John Peart

Error page

404 and 500 layouts with clear recovery actions.

A full-page layout shown when a URL doesn't resolve (404), a required resource fails (5xx), or a user lands somewhere unexpected. The goal is to explain what happened and offer an obvious next step.

Anatomy

  1. Status code — large display type so people know which error they're looking at.
  2. Short headline — human translation of the code.
  3. Explanation — one or two sentences on what went wrong.
  4. Recovery actions — one primary button plus supporting links.

404

Oops!

Well, this is a bit embarrassing. The page you're looking for either doesn't exist or it's lost.

Email me about this error

Go to the home page

Implementation

  • Return the correct HTTP status code — don't serve a 404 page with a 200.
  • The page should render without any JavaScript, any API calls, or any authenticated data.
  • Keep it on the same layout as the rest of the site so navigation still works.

Tone

Be honest and a little warm. Avoid blaming the visitor ("You entered the wrong URL") — an error page is an apology, not a rebuke.

A line drawing of John Peart

John Peart

www.johnpe.art

Mastodon logo

Mastodon

BlueSky logo

Bluesky

LinkedIn logo

LinkedIn

Github logo

GitHub