Support0

HTML progress playground

Explore progress with controls for the current value, the task maximum, and the indeterminate state created by omitting the value attribute.

Ask AI

HTML progress playground

Response generated with openai/gpt-5.4-nano. AI can make mistakes. Always review the result.
Determinate
68%
68% 68 / 100
HTML
<label for="task-progress">Uploading portfolio.zip</label>
<progress id="task-progress" max="100" value="68">
  68%
</progress>

Educational guide to <progress>

Communicate the progress of a task

Represent completed work or activity with unknown progress. Learn to use value and max, distinguish zero from indeterminate, and communicate meaningful changes with a label and visible text.

Mental model

The task defines the total; the available data determines whether there is a fraction.

  1. Task

    There is work that can reach completion.

  2. Known progress

    value / max expresses the completed fraction.

  3. Unknown progress

    Without value, only ongoing activity is communicated.

Activity and percentage answer different questionsStatic diagram: a task may have measurable progress or be waiting without a known fraction. The following examples use native progress elements; the final demonstration changes states manually.

progress represents task completion, such as uploading files or generating a report. The bar neither performs that operation nor discovers its state: your application supplies the data. The percentage of completed work does not necessarily predict remaining time; processing four files may take longer than processing another four.

value and max

The total can be a fraction, a file count, or units of work.

The minimum is always 0 and max defaults to 1. Set max greater than 0 and value between 0 and max; use a decimal point without units or a % sign. value=0.6 with the implicit maximum represents 60%. To count files, value=3 and max=8 represents 3/8: 37.5%, rather than 3%. progress does not accept min, low, high, or optimum.

A fraction with the implicit maximum

60%

60% complete: a fraction of 0.6 out of a total of 1.

value=0.6 and an implicit max of 1 place the bar at 60%. The number remains visible outside the element.
A fraction with the implicit maximum
<div class="progress-guide-scene">
  <label for="progress-guide-fraction">Report generation</label>
  <progress id="progress-guide-fraction" value="0.6" aria-describedby="progress-guide-fraction-text">60%</progress>
  <p id="progress-guide-fraction-text">60% complete: a fraction of 0.6 out of a total of 1.</p>
</div>
.progress-guide-scene {
  display: grid;
  gap: 1rem;
  min-inline-size: 0;

  progress {
    inline-size: min(100%, 20rem);
    block-size: 1.5rem;
  }

  p {
    margin: 0;
  }

  button {
    justify-self: start;
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    font: inherit;

    &:focus-visible {
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }
  }
}

Count work in its own units

3 out of 8 files uploaded

3 out of 8 files uploaded

Three out of eight files equals 37.5%. aria-valuetext expresses the file count, and visible text preserves the same information.
Count work in its own units
<div class="progress-guide-scene">
  <label for="progress-guide-files">Uploaded files</label>
  <progress
    id="progress-guide-files"
    value="3"
    max="8"
    aria-valuetext="3 out of 8 files uploaded"
  >3 out of 8 files uploaded</progress>
  <p>3 out of 8 files uploaded</p>
</div>
.progress-guide-scene {
  display: grid;
  gap: 1rem;
  min-inline-size: 0;

  progress {
    inline-size: min(100%, 20rem);
    block-size: 1.5rem;
  }

  p {
    margin: 0;
  }

  button {
    justify-self: start;
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    font: inherit;

    &:focus-visible {
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }
  }
}

Position is value / max. The browser uses 1 for a missing, invalid, or nonpositive max; when value is present, invalid or negative data is interpreted as 0 and excess is clamped to the maximum. This does not validate your data source. HTML accepts decimals; this playground offers nonnegative integers and limits max to 1–500 for convenient exploration.

Determinate and indeterminate

Zero is a known amount; indeterminate means there is no known fraction.

value="0" is still determinate. For an indeterminate state, omit value or remove it with removeAttribute("value"). value="" does not work: the attribute remains present and is interpreted as 0. When measurable progress becomes available, assign progress.max and progress.value using operation data. :indeterminate selects the state without duplicating it in a class.

Compare zero with unknown progress

0%

0% complete: no data has been transferred yet.

Checking the files; progress unknown.

Checking the files; progress unknown.

The first task has known progress of 0%. The second has no value: it remains active without a percentage. Text distinguishes the states even when the system draws similar bars or does not animate them.
Compare zero with unknown progress
<div class="progress-guide-scene">
  <label for="progress-guide-zero">Transfer with known progress</label>
  <progress id="progress-guide-zero" value="0" max="100" aria-describedby="progress-guide-zero-text">0%</progress>
  <p id="progress-guide-zero-text">0% complete: no data has been transferred yet.</p>
  <label for="progress-guide-unknown">Check in progress</label>
  <progress id="progress-guide-unknown" aria-describedby="progress-guide-unknown-text">Checking the files; progress unknown.</progress>
  <p id="progress-guide-unknown-text">Checking the files; progress unknown.</p>
</div>
.progress-guide-scene {
  display: grid;
  gap: 1rem;
  min-inline-size: 0;

  progress {
    inline-size: min(100%, 20rem);
    block-size: 1.5rem;
  }

  p {
    margin: 0;
  }

  button {
    justify-self: start;
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    font: inherit;

    &:focus-visible {
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }
  }
}

Indeterminate does not mean failure, pause, or infinite duration. Explain what is happening and offer the actions appropriate to the actual process. Do not invent a percentage or timer to suggest progress. When the task ends, confirm the outcome; a full bar alone does not explain success, errors, or a pending phase.

Label and change announcements

The native value and a status message have different responsibilities.

Associate label for with the progress id to name the task. Native semantics provide the role and range: do not add role="progressbar" or duplicate value/max with aria-valuenow/min/max. aria-describedby connects an explanation, and aria-valuetext can express units. Content between the tags is fallback text, not an accessible label or a number that will appear alongside the bar.

Step through phases and communicate the outcome

Demonstration ready: 0 out of 4 files uploaded.

Demonstration ready: 0 out of 4 files uploaded.

Manual demonstration with no file uploads: each press moves through indeterminate preparation, 2 out of 4, completion, and reset. The same status region keeps its node and updates its text; focus stays on the button. Without JavaScript, the initial example of 0 out of 4 remains.
Step through phases and communicate the outcome
<div class="progress-guide-scene" data-progress-guide-demo>
  <label for="progress-guide-demo">File upload demonstration</label>
  <progress id="progress-guide-demo" value="0" max="4" aria-describedby="progress-guide-status">Demonstration ready: 0 out of 4 files uploaded.</progress>
  <p id="progress-guide-status" role="status" aria-atomic="true">Demonstration ready: 0 out of 4 files uploaded.</p>
  <button type="button" data-progress-guide-next hidden>Show next phase</button>
  <noscript>Initial example of 0 out of 4. Enable JavaScript to step through the phases manually.</noscript>
</div>
.progress-guide-scene {
  display: grid;
  gap: 1rem;
  min-inline-size: 0;

  progress {
    inline-size: min(100%, 20rem);
    block-size: 1.5rem;
  }

  p {
    margin: 0;
  }

  button {
    justify-self: start;
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    font: inherit;

    &:focus-visible {
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }
  }
}
(() => {
  const demo = document.querySelector('[data-progress-guide-demo]');
  if (!demo || demo.dataset.ready === 'true') return;

  const progress = demo.querySelector('progress');
  const status = demo.querySelector('[role="status"]');
  const next = demo.querySelector('[data-progress-guide-next]');
  if (!progress || !status || !next) return;

  const messages = ["Demonstration ready: 0 out of 4 files uploaded.","Preparing the upload; progress unknown.","Upload in progress: 2 out of 4 files uploaded.","Upload complete: 4 out of 4 files uploaded."];
  const values = [0, null, 2, 4];
  let phase = 0;
  demo.dataset.ready = 'true';
  next.hidden = false;

  next.addEventListener('click', () => {
    phase = (phase + 1) % values.length;
    const value = values[phase];

    if (value === null) {
      progress.removeAttribute('value');
    } else {
      progress.value = value;
    }

    progress.textContent = messages[phase];
    status.textContent = messages[phase];
  });
})();

progress is not a live region by itself. In a dynamic operation, keep a role="status" region and update its text at meaningful milestones: start, phase changes, useful progress, and completion. Its announcement is polite; aria-atomic="true" allows the whole message to be presented. Avoid emitting every byte or animation frame, and do not move focus to announce progress. Verify the result with real screen readers.

When a task updates a content section, set aria-busy="true" on that section and connect its status with aria-describedby; when finished, set aria-busy to false or remove it. Keep messages that should be announced outside a busy region to avoid deferring them. This example demonstrates only the indicator and its messages: it does not load a real region. progress is a readout with no tabindex or arrow-key adjustment; the button uses native keyboard behavior.

Progress versus measurement

Choose by the meaning of the data, even when the rendering looks similar.

progress: “how much work is complete?” Eight files to upload have a completion goal; when you cannot measure their progress yet, omit value. The total may change as more work is discovered, but explain the change so a falling percentage does not look like an error.

meter: “what is the current level?” Used disk space or battery charge are measurements within a known range. They do not represent a task that should reach the maximum and can have low, high, and optimum. A file upload uses progress; the space remaining afterwards uses meter.

Common pitfalls

Check the attributes, actual state, and message the person receives.

value=60 fills the entire bar

Expected result
Show 60% completion of a task.
Cause
max is omitted: the implicit total is 1, not 100.
Solution
Use value=0.6 or set max=100 and value=60; also show the number in text.

An empty value does not activate the indeterminate state

Expected result
Communicate activity without a known fraction.
Cause
value remains present as an empty string or is replaced with 0.
Solution
Omit value or call removeAttribute("value"); keep an activity message.

Progress changes without a meaningful message

Expected result
Know the start, milestones, and outcome without losing focus.
Cause
Only value is changed, or internal text is expected to be a live region.
Solution
Add a persistent status with visible text, synchronize it with real milestones, and check announcements without emitting every update.

Disk usage is presented as task completion

Expected result
Explain a measurement within the total capacity.
Cause
progress is chosen because it visually resembles a gauge.
Solution
Use meter for the occupied level and progress for the work of copying or uploading files.

Support and compatibility

Element compatibility and state presentation are separate concerns.

progress is Baseline Widely Available. MDN and BCD document support in major browsers. BCD retains a Safari on iOS caveat: the indeterminate bar is drawn like a 0% bar. Keep an “in progress” message outside the bar and check your real devices; element support does not guarantee identical animation, appearance, or announcements.

Examples use native rendering with no prefixed pseudo-elements, polyfills, or custom animations. Visible text explains the state in forced colors or reduced motion, too; internal content provides fallback for older agents. Static examples need no JavaScript, and the demonstration keeps its initial reading without it. Customizing a bar requires an additional compatibility check.