DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
CSS

Simple Loading Screen HTML: Accessible Spinner and Progress Patterns

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A simple HTML loading screen needs two things: a clear text status and a visual cue that does not pretend to measure progress. Use a decorative CSS spinner when the wait is indeterminate. Use the native <progress> element only when your code has a real value to report. The complete starter pattern below also stops nonessential motion when a visitor prefers reduced motion.

Start with an indeterminate loading screen

This pattern is suitable for an API request, route transition or other task whose completion time is unknown. The text remains meaningful if animation is disabled, while the circle is explicitly decorative.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Loading example</title>
  <style>
    .loading {
      display: inline-flex;
      align-items: center;
      gap: .75rem;
      padding: 1rem;
      color: #222;
      font: 1rem system-ui, sans-serif;
    }

    .spinner {
      width: 1.25rem;
      height: 1.25rem;
      border: .2rem solid #d8d8d8;
      border-top-color: #2563eb;
      border-radius: 50%;
      animation: spin .8s linear infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    @media (prefers-reduced-motion: reduce) {
      .spinner { animation: none; }
    }
  </style>
</head>
<body>
  <div class="loading" role="status" aria-live="polite">
    <span class="spinner" aria-hidden="true"></span>
    <span>Loading…</span>
  </div>
</body>
</html>

role="status" makes the message available as a status update without moving keyboard focus. aria-live="polite" asks assistive technology to announce it when appropriate. The spinner has aria-hidden="true" because its rotation adds no information beyond the message. Change “Loading…” to a specific state such as “Loading account details…” when that helps people understand what is happening.

Choose the right loading model

Indeterminate waiting

Use the spinner pattern when you cannot calculate a meaningful percentage. Do not animate a bar from zero to 100 merely to make a wait look active; that implies a measurement you do not have. A text status is the source of meaning, and the animation is optional decoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Determinate progress

When the task exposes actual completed and total units, use native HTML progress semantics:

<section id="upload-panel" aria-busy="true" aria-describedby="upload-status">
  <h2>Upload</h2>
  <div id="upload-status">Uploading 2 of 5 files</div>
  <progress id="upload-progress" max="5" value="2">
    2 of 5 files
  </progress>
</section>

Update value from the real task data, not a timer. Keep a visible or programmatically associated label. The text fallback inside <progress> is useful if the element cannot be rendered, but it does not replace the surrounding explanation.

Unknown total with milestones

If you know named stages but not a percentage, report stages instead: “Connecting…”, “Downloading records…” and “Preparing results…”. Keep the indicator indeterminate until a genuine total becomes available.

Show that the correct region is busy

A full-page overlay is not always the best experience. If only a results panel is changing, put aria-busy="true" on that panel and associate its status with aria-describedby. Clear the busy state when the update finishes or fails.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
<main id="results" aria-busy="false" aria-describedby="results-status">
  <p id="results-status" role="status" aria-live="polite"></p>
  <div id="result-list"></div>
</main>

<script>
  const region = document.querySelector('#results');
  const status = document.querySelector('#results-status');

  function beginLoading() {
    region.setAttribute('aria-busy', 'true');
    status.textContent = 'Loading results…';
  }

  function finishLoading(message) {
    region.setAttribute('aria-busy', 'false');
    status.textContent = message;
  }
</script>

Set the state before starting the request and clear it on success, failure and cancellation. Do not put focus on the spinner for an ordinary background update; unexpected focus movement interrupts keyboard and screen-reader users.

Update the status from real JavaScript

<div id="panel" aria-busy="false" aria-describedby="status">
  <p id="status" role="status" aria-live="polite"></p>
  <div id="content"></div>
</div>

<script>
  const panel = document.querySelector('#panel');
  const status = document.querySelector('#status');
  const content = document.querySelector('#content');

  async function loadContent() {
    panel.setAttribute('aria-busy', 'true');
    status.textContent = 'Loading content…';

    try {
      const response = await fetch('/api/content');
      if (!response.ok) throw new Error(`HTTP ${response.status}`);
      content.textContent = await response.text();
      status.textContent = 'Content loaded.';
    } catch (error) {
      status.textContent = 'Content could not be loaded. Try again.';
      console.error(error);
    } finally {
      panel.setAttribute('aria-busy', 'false');
    }
  }

  loadContent();
</script>

Announce meaningful transitions, such as started, completed and failed. Avoid replacing the live-region text many times per second for cosmetic progress; frequent announcements can overwhelm assistive technology.

Make the visual design usable

  • Use sufficient contrast between the label and its background, and make the spinner’s border distinguishable from the page.
  • Keep the status visible during the entire wait; do not rely on color or movement alone.
  • For a blocking overlay, explain what is blocked and provide a cancel or retry action when the operation supports one.
  • Prevent layout shifts by reserving space for the indicator before the request begins.
  • Stop the indicator on every terminal path: success, error, timeout and user cancellation.

The prefers-reduced-motion: reduce media query is a request to minimize movement. Removing the rotation while retaining “Loading…” satisfies the communication goal without forcing animation. Reduced motion is not the same as high contrast, forced colors or a screen reader, so test those modes separately.

Native HTML versus custom ARIA

Prefer built-in elements when their meaning matches the task. Native <progress> supplies progress semantics and value handling that a generic <div role="progressbar"> requires you to recreate. A custom role is possible, but then you must maintain its accessible name, value, minimum and maximum states, and updates correctly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Use status messaging for state changes and leave focus where it is unless the user explicitly starts a workflow that requires a focused result. WCAG success criterion 4.1.3 addresses status messages that can be determined programmatically and presented without taking focus. W3C’s C39 page is an example technique, not a mandatory recipe or a guarantee of conformance; the W3C documentation states that techniques are examples of ways to meet WCAG and are not required for conformance.

Common problems and fixes

The spinner never stops

Put cleanup in a finally block and handle non-2xx responses. A request that rejects, times out or is aborted must clear aria-busy and replace the loading message with an error or cancellation message.

The percentage is misleading

Remove the simulated value. Switch to an indeterminate status until the server exposes reliable totals, or report named stages instead of inventing a percentage.

Screen readers announce nothing

Check that the status node exists before the text changes, has an accessible name or role="status", and is not hidden with display:none. Update text only for meaningful events.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The page moves when loading starts

Reserve the indicator’s dimensions in the initial layout. Avoid inserting a large overlay after content has rendered unless the interaction genuinely blocks the page.

Reduced motion still spins

Confirm that the animation is applied to the spinner class and that the media query is not overridden by a later rule. Keep the textual status visible even when animation is disabled.

The region remains marked busy

Set aria-busy="false" in success, error, timeout and cancellation paths. Leaving it true can make completed content appear unavailable to assistive technology.

Performance and reliability notes

  • Prefer a small CSS-only indicator over a large image or JavaScript animation loop.
  • Use one shared loading component so labels, states and cleanup behave consistently across routes.
  • Do not delay useful content solely to display a minimum spinner duration; reserve delays for preventing distracting flashes when a request completes almost immediately.
  • Pair long operations with timeout handling and a retry action. A loading indicator is feedback, not recovery.
  • Test keyboard navigation, zoom, reduced motion, forced-colors mode and at least one screen reader. These checks reveal problems that a visual browser inspection misses.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a screenshot of a page containing this loading state rather than a live component, ScreenshotNeo returns a PNG, JPEG, WebP or PDF from one GET request. It accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and whether it was billed. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using the API (see the ScreenshotNeo documentation):

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free. Every feature is available on every plan. Create a free ScreenshotNeo account to try it without adding a card.

FAQ

Should a spinner have role="progressbar"?

Not when it has no measured value. Use a status message and treat the spinner as decorative. Reserve progress semantics for actual progress.

Can I use an animated GIF instead of CSS?

Yes, but CSS makes reduced-motion handling and styling easier. Whichever visual you choose, retain an understandable text status.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When should loading text be announced again?

Announce meaningful state changes such as completion, failure or a new stage. Do not repeatedly announce rapidly changing cosmetic updates.

Frequently Asked Questions

Should a spinner have role=”progressbar”?

Not when it has no measured value. Use a status message and treat the spinner as decorative. Reserve progress semantics for actual progress.

Can I use an animated GIF instead of CSS?

Yes, but CSS makes reduced-motion handling and styling easier. Whichever visual you choose, retain an understandable text status.

When should loading text be announced again?

Announce meaningful state changes such as completion, failure or a new stage. Do not repeatedly announce rapidly changing cosmetic updates.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.