Progress, Meter and Output

Beginner · 7 min

What progress, meter and output are for: a task's completion, a measurement within a range, and a calculated result, and how each differs from a styled div.

Before thisFile Inputs and Uploads

Miljan Peric · 7 min

Progress, Meter and Output

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by Miljan PericReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • `<progress>` shows how far a task has got. With `value` and `max` it is determinate; with no `value` it is indeterminate, an animated "working" state. In a test an indeterminate bar had `position` of -1.
  • `<meter>` shows a measurement inside a known range, such as disk use or a score. It is not for progress. `low`, `high` and `optimum` tell the browser which part of the range is good.
  • Both clamp: in a test, `progress.value = 99` with `max=10` read back 10, and a meter set to -5 or 50 in a 0 to 10 range read 0 and 10.
  • `<output>` holds the result of a calculation or user action. It takes a `for` list of the control ids that fed it, and its role is `status`, so changes are announced politely. In a test it was not part of the form data.
  • A `<div>` styled as a bar looks the same but is invisible to assistive technology. The native elements expose their value and role for free.

Three elements that show state

Forms collect input, but they also report back: how far an upload has got, how full a quota is, what the total comes to. You can draw all of that with a styled <div>, and many sites do. A <div> is only pixels, though. A screen reader cannot tell it is a bar, how full it is, or that it changed. HTML has three elements for these jobs, and each carries its meaning.

progress

<progress> is a task’s completion.

<label for="up">Uploading</label>
<progress id="up" value="40" max="100">40%</progress>

max defaults to 1. With value it is determinate: a filled fraction. Without value it is indeterminate: the browser draws an animation to say “working, no idea how long”. The text inside is a fallback for very old browsers and is also a good place for a number.

I tested the edge cases in headless Chromium, Firefox and WebKit. A bar with no value had position of -1, which is how scripts tell indeterminate from determinate. With max="10", setting value to 99 read back as 10, and position was 1; setting value to 5 gave position of 0.5. The accessibility tree listed it as a progressbar. Style it with CSS, using progress::-webkit-progress-value and progress::-moz-progress-bar, since the parts are pseudo-elements that differ by engine.

Update it from JavaScript while the work runs: xhr.upload.onprogress reports bytes for an upload, and you set value and max from them. fetch does not report upload progress in all browsers, so XHR is the usual route for that one job. See fetch and working with APIs.

meter

<meter> is a measurement within a range. It is not progress: disk use, a password score, a vote share, the temperature of a battery.

<meter value="85" min="0" max="100" low="30" high="80" optimum="20">85%</meter>

low, high and optimum split the range into three regions, and optimum says which end is good. Here, low values are good, so 85 sits in the bad region and the browser can colour it accordingly. A meter clamps to its range: in a test, a value of -5 in a 0 to 10 range read back 0 and a value of 50 read 10. The accessibility tree listed it as a meter.

The distinction is worth keeping. If the thing will reach 100% and finish, it is <progress>. If it just is a level that can go up or down, it is <meter>.

output

<output> shows the result of a calculation or an action, usually inside a form:

<form oninput="total.value = Number(a.value) + Number(b.value)">
  <input id="a" type="number" value="2"> + <input id="b" type="number" value="3">
  = <output name="total" for="a b">5</output>
</form>

for lists the ids of the controls that fed the result, which documents the relationship for tools. The element’s value and its text content are the same thing. In a test, with an input listener setting o.value, typing 10 into the first field gave an output of 13 in all three browsers, htmlFor read a b, and the element’s type was output.

Two things set it apart from a <span>. Its implicit role is status (the tree showed status "13"), which is a polite live region, so a screen reader announces the new result without taking focus. And it is a form-associated element: it appears in form.elements, which listed OUTPUT after the inputs. It is not submitted, though. In a test, the form data held no entry for the output even when it had a name. If the server needs the number, send the inputs and calculate there.

When not to use them

Do not use <progress> for a step indicator in a checkout (“step 2 of 4”): an ordered list with aria-current says more. Do not use <meter> for anything the user can set; that is <input type="range">. Do not use <output> for long-lived page content, only for results that change as the user interacts.

What the video covers

The embed is the whole of Miljan Peric’s “HTML5 Tutorial #32: Progress Bars & Meter Elements Explained” (November 2026), part of a beginner HTML5 series. Its description says it covers the difference between progress bars and meter indicators and their attributes: value, max, min and, going by the visible list, more. It does not appear to cover <output>, which comes from the lesson. It is from a small channel and only days old at the time of writing, and has no chapters. I could not read a transcript. The clamping, position, role and form-data results are mine, run in headless Chromium, Firefox and WebKit; I did not test how browsers colour a meter’s regions.

Where this fits

This ends the forms group, after file inputs and uploads. Live regions return in ARIA roles, states and properties. Next, the course moves to the head of the document.

Check yourself

  1. 01A file upload is 40% done. Which element shows that, and what are the attributes?

    `<progress value="40" max="100">`. Update `value` as upload events arrive. If you cannot tell how far along the work is, omit `value` for an indeterminate bar.

  2. 02A disk is 85% full and you want it to look worse than at 40%. Why `<meter>` and not `<progress>`?

    Disk use is a measurement against a range, not a task heading for completion. `<meter value="85" min="0" max="100" high="80">` tells the browser 85 is in the high region, so it can colour it differently. A progress bar has no concept of good or bad.

  3. 03You set `progress.value = 99` on `<progress max="10">`. What does `value` return?

    10. The value is clamped to the range. In a test, `position` was 1, meaning complete. A meter clamps to its `min` and `max` in the same way.

  4. 04Does the text of an `<output>` get submitted with the form?

    No. `<output>` is a result display, not a submittable control, so it is left out of the form data even when it has a `name`. If the server needs the number, compute it there or copy it into a hidden input.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark