HTML meter tag
HTML

HTML meter tag

Mishel Shaji
Mishel Shaji

The HTML meter tag is used for indicating a scalar measurement within a known range, or a fractional value.

This should not used to display progress bars. To display progress bars, use <progress> tag.

Attributes

AttributeDescriptionOmission
valueUsed to the current value. This must be between the minimum and maximum values if they are specified.Required
minSpecifies the minimum value. It must be less than the maximum value. If not specified, the value will be 0.Optional
maxSpecifies the maximum value. It must be greater than the minimum value. If not specified, the value will be 1.Optional
lowSpecifies the range that is considered to be the low value. This must be greater than the minimum value, and it also must be less than the high value and maximum value, if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value.Optional
highSpecifies the range that is considered to be a high value. The lower numeric bound of the high end of the measured range. This must be less than the maximum value, and it also must be greater than the low value and minimum value, if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value.
Optional
optimumSpecifies the optimum numeric value.Optional
formSpecifies one or more forms the meter element belongs to.Optional

Example 1

<p>Meter tag with min and max attributes</p>
<br>
<p>Disk usage: <meter min="0" max="100" value="80">80%</meter></p>
<br>
<p>Meter tag without min and max attributes</p><br><p>Disk usage: <meter value="0.8">80%</meter></p>

Output

Meter tag with min and max attributes


Disk usage: 80%


Meter tag without min and max attributes


Disk usage: 80%

Example 2

<p>Meter tag with min and max attributes</p>
<br><p>Disk usage: <meter min="0" max="100" low="10" high="70" value="80">80%</meter></p><br>
<p>Meter tag without min and max attributes</p><br><p>Disk usage: <meter min="0" max="100" low="10" high="95" value="80">80%</meter></p>

Output

Meter tag with min and max attributes


Disk usage: 80%


Meter tag without min and max attributes


Disk usage: 80%

Try it yourself