HTML Meter and Progress: Measurements and Tasks
Measure a value within a range
Use meter for a scalar measurement with known bounds, such as storage utilization. min and max define the scale; low, high and optimum describe preferred regions. They do not impose form validation.
<label> Storage used <meter min="0" max="100" low="50" high="80" optimum="0" value="65">65%</meter></label>The meter reports 65 of 100; lower usage is preferable in this example.
Show known task completion
Use progress for a task moving toward completion. It always starts at zero; max is the total work and value is the completed amount. The browser determines the visual style.
<label> Files processed <progress max="8" value="3">3 of 8</progress></label>The task is 3/8 complete (37.5%).
Unknown progress
When you cannot estimate the completed amount, omit value to create an indeterminate progress indicator. value="0" is different: it states that no measurable work has completed. Keep a visible text status so users know what is happening.
<label> Preparing report <progress></progress></label><p>Checking available records…</p>The indicator represents an ongoing task with no known percentage.
Common mistakes and practice
Use meter for a measurement, progress for task completion. Supply an accessible label; fallback text inside an element is not a reliable accessible name. Do not communicate important state through color alone. Neither element is an editable range input.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML Meter and Progress: Measurements and Tasks — Knowledge Check
Apply the control concepts taught in this lesson.
Which element represents battery level?
How do you represent unknown task completion?
What is the lower bound of progress?
A progress element has max="100" value="0". What does it represent?
Which meter attribute describes a preferred value within its range?