Skip to content
Tutorials Center
My learning

Topics

HTML Reference Β· Forms

The <progress> element

Reference for the HTML <progress> element: determinate and indeterminate progress bars, the value and max attributes, accessibility notes and technical details.

The <progress> element shows how far a task has advanced: an upload, a download, the steps of a sign-up wizard. With a value it is a determinate bar that fills from 0 to max. Without a value it is indeterminate: the task is under way but you can't tell how long it will take, and browsers show an animated bar.

HTML
<label for="upload">Uploading photo</label>
<progress id="upload" max="100" value="40">40%</progress>

The text inside is fallback content for browsers that don't draw the bar.

Try it

Determinate and indeterminate

The second bar has no value, so it stays indeterminate. In a script, removeAttribute("value") turns a determinate bar back into an indeterminate one.

Attributes

Attribute Values Description
value Number from 0 to max How much of the task is done. Omit it for an indeterminate bar. Values above max are treated as max.
max Positive number How much work the task needs in total. Default 1.

There is no min: progress always starts at 0. It also accepts the global attributes.

Usage notes

  • <progress> vs <meter>. Use progress for completion of a task over time. For a measurement that can be anything in a range (battery, score), use <meter>.
  • Choose a convenient max. max="12" with value="5" for files is clearer than converting to percentages yourself.
  • Label it. Give the bar a <label> or aria-label so screen readers know which task it belongs to. Showing the number in text next to it helps everyone.
  • Announcing updates. Screen readers don't always announce changes. For long tasks, also update a text status, for example in an <output> or an element with aria-live="polite".
  • Loading a region of the page? Put aria-busy="true" on the region while it loads and aria-describedby pointing to the progress bar, then remove aria-busy when the content arrives.
  • Not a form control. It is labelable but never submitted.

Technical summary

Content categories Flow content, phrasing content, palpable content; labelable
Permitted content Phrasing content, but no <progress> descendants
Tag omission None; both the start and end tags are required
Permitted parents Any element that accepts phrasing content
Implicit ARIA role progressbar
DOM interface HTMLProgressElement
Default display inline-block

Browser support

Supported in every current browser.