docs.rodeo

MDN Web Docs mirror

: The HTML Meter element

{{HTMLSidebar}} 

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

{{EmbedInteractiveExample("pages/tabbed/meter.html", "tabbed-shorter")}} 

Attributes

This element includes the global attributes.

Examples

Basic Example

HTML

<p>Battery level: <meter min="0" max="100" value="75">75%</meter></p>

Result

{{EmbedLiveSample("Basic_example", 300, 60)}} 

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

<p>
  Student's exam score:
  <meter min="0" low="50" high="80" max="100" value="84">84%</meter>
</p>

Result

{{EmbedLiveSample("High_and_Low_range_example", 300, 60)}} 

Technical Summary

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 parents Any element that accepts phrasing content.
Implicit ARIA role meter
Permitted ARIA roles No role permitted
DOM interface `{{domxref("HTMLMeterElement")}}` 

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN