The HTML <meter> tag
The HTML <meter> element represents a scalar measurement within a known range — disk usage, a score, a rating. Set value with min/max, and use low/high/optimum to color-code it. It is not for task progress — use <progress> for that.
Overview
The <meter> element is a gauge for a scalar value within a known range — how full a disk is, password strength, a quiz score, a rating out of five. You set the current value and the bounds with min and max.
What sets it apart is the low, high and optimum attributes, which let the browser color the gauge to signal whether the value is in a good, mediocre or poor range (commonly green, yellow, red). That makes it expressive for at-a-glance status, like a strength meter.
Crucially, it represents a static measurement, not how far along a task is — for task progress, use <progress> instead. As with progress, always include a text label so the value is also available in words for assistive technology.
Syntax
<meter min="0" max="100" low="30" high="70" optimum="90" value="85">85%</meter>
Attributes
The <meter> element supports the following attributes, in addition to the global attributes available to every HTML element.
| Attribute | Value | Description |
|---|---|---|
high |
A number within the meter's range. | Sets the high boundary of a meter. |
low |
A number within the meter's range. | Sets the low boundary of a meter. |
max |
A number or date, depending on the control. | Sets the maximum allowed value. |
min |
A number or date, depending on the control. | Sets the minimum allowed value. |
optimum |
A number within the meter's range. | Sets the optimum value of a meter. |
value |
A string or number, depending on the element and input type. | Sets a control's value. |
Example
<label>Disk: <meter min="0" max="100" low="30" high="70" optimum="20" value="82">82%</meter></label>
Best practices
- Set
value,minandmaxto define the measurement and its range. - Use
low,highandoptimumso the browser can color the gauge meaningfully. - Use it for a measurement, not task progress — for that, use <progress>.
- Include a visible text label so the value is conveyed in words too.
Frequently asked questions
What is the meter element for?
What is the difference between meter and progress?
<meter> shows a measurement within a range; <progress> shows how far along a task is.How do the low, high and optimum attributes work?
How do I style a meter?
::-webkit-meter-bar and related pseudo-elements, to customize the track and value colors.