English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <meter> tag

The HTML <meter> element is used to display scalar values or fractional values within a known range.

Online Example

Use the meter element to display the given data range:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(oldtoolbag.com)</title> 
</head>
<body>
<p>Heat the oven to <meter min="200" max="500" value="350">350 degrees</meter>.<br>
<meter value="0.6">60%</meter>
</p>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <meta> tag.

Definition and usage instructions for the tag

The <meter> tag defines a measurement. It is used only for measurements with known maximum and minimum values.

such as: disk usage, relevance of query results, etc.

Note: The <meter> cannot be used as a progress bar, progress bars <progress> tag.

Use notes: unless the value range is from 0 to1(closed interval), otherwise the min and max attributes must be defined to ensure that the value attribute is within the value range. In other words, the default min and max values are 0 and1.

HTML 4.01 with HTML5 difference

The <meter> is an HTML5 new tag.

Attribute

AttributeValueDescription
formHTML5form_idSpecifies one or more forms that the <meter> element belongs to.
highHTML5numberSpecifies the range of values defined as high.
lowHTML5numberSpecifies the range of values defined as low.
maxHTML5numberSpecifies the maximum value of the range.
minHTML5numberSpecifies the minimum value of the range.
optimumHTML5numberSpecifies the optimal value of the measurement.
valueHTML5numberRequired. Specifies the current value of the measurement.

Global Attributes

The <meter> tag supports global attributes, see the complete attribute table HTML Global Attributes.

event attributes

The <meter> tag supports all HTML Event Attributes.