HTML - <meter>

The HTML <meter> Element represents either a scalar value within a known range or a fractional value.

Examples

Simple example

HTML content

HTML
<p>Heat the oven to <meter min="200" max="500" value="350">350 degrees</meter>.</p>

Output

On Google Chrome, the resulting meter looks like this:

meter1.png

High and Low range example

Note that in this example the min attribute is omitted; this is allowed, as it will default to 0.

HTML content

HTML
<p>He got a <meter low="69" high="80" max="100" value="84">B</meter> on the exam.</p>

Output

On Google Chrome, the resulting meter looks like this:

meter2.png

Description  

The HTML <meter> Element represents either a scalar value within a known range or a fractional value.

Usage note: Unless the value attribute is between 0 and 1 (inclusive), the min and max attributes should define the range so that the value attribute's value is within it.
Content categories Flow content, phrasing content, labelable content, palpable content.
Permitted content Phrasing content, but there must be no <meter> element among its descendants.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parent elements Any element that accepts phrasing content.
DOM interface HTMLMeterElement

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Edge Opera Safari
Basic support 6.0 16.0 (16.0) No support 20[1] 11.0 5.2
Feature Android Firefox Mobile (Gecko) IE Mobile Edge Mobile Opera Mobile Safari Mobile
Basic support No support 16.0 (16.0) No support 20[1] 11.0 No support

[1] See the Microsoft Edge Platform Status page.

See Also  

Specifications  

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<meter>' in that specification.
Living Standard  
HTML5
The definition of '<meter>' in that specification.
Recommendation Initial definition

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/meter

Element HTML HTML forms HTML5 Reference Web