The <meter> element
The <meter> tag shows a measurement within a known range as a gauge, such as disk space used, a battery level or a quiz score. Set value plus min and max. The optional low, high and optimum attributes tell the browser which part of the range is good, so it can color the bar green, yellow or red.
Last updated: October 3, 2026
Quick facts
| Category | Flow content, phrasing content, labelable, palpable content |
| Content model | Phrasing content, but no <meter> inside |
| Tag omission | Neither the start nor the end tag can be omitted |
| Permitted parents | Any element that accepts phrasing content |
| DOM interface | HTMLMeterElement |
Syntax
Live example
Edit the code below and watch the preview update instantly.
Attributes
| Attribute | Description |
|---|---|
| value | Required. The current measurement |
| min / max | The lower and upper ends of the range (default 0 and 1) |
| low | The top of the “low” part of the range |
| high | The bottom of the “high” part of the range |
| optimum | The best value. Where it falls (low, middle or high part) decides which colors mean good or bad |
Common examples
Disk space used
A classic gauge: the value is a measurement inside a known range.
A password strength indicator
Update the meter as the person types; optimum tells the browser that high is good.
A star rating shown as a gauge
Ratings are measurements too. Include the number as text for people who can’t see the bar.
<meter> vs <input type=”range”>
They can look alike — both show a value along a bar — but one is read-only and the other is a control. <meter> displays a measurement: the visitor can’t change it. <input type="range"> is a slider the visitor drags to choose a value, which is sent with a form.
Use meter for results (battery level, a score, storage used) and range for settings (volume, price filter, brightness).
| <meter> | input type=”range” | |
|---|---|---|
| Can the user change it | No | Yes |
| Sent with a form | No | Yes |
| Best for | Showing a measurement | Choosing a value |
Common mistakes to avoid
- Using meter for a task in progress. Loading and uploading belong in <progress>.
low/highoutside min and max. The browser clamps them and the colors stop making sense.- Relying on the color alone. Green/yellow/red isn’t visible to everyone; show the value as text too.
- No label. A bare gauge doesn’t say what it measures.
Accessibility & SEO tips
- Write the fallback text inside the element (“96 GB of 128 GB”) — some screen readers and old browsers use it.
- Connect a meter to the field it describes with
aria-describedby, as in the password example. - Keep the visible number next to the gauge so the value is clear without zooming in.
- Choose
low,highandoptimumcarefully so the color says the right thing — for battery level high is good, for disk usage high is bad.
Browser support
Supported in all modern browsers, including Chrome, Edge, Firefox, Safari and their mobile versions. It was introduced with HTML5, and only very old browsers such as Internet Explorer 8 needed workarounds. Colors and shape differ between browsers; Safari and Chrome support styling with ::-webkit-meter pseudo-elements.