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
Attribute | Description | Omission |
value | Used to the current value. This must be between the minimum and maximum values if they are specified. | Required |
min | Specifies the minimum value. It must be less than the maximum value. If not specified, the value will be 0. | Optional |
max | Specifies the maximum value. It must be greater than the minimum value. If not specified, the value will be 1. | Optional |
low | Specifies 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 |
high | Specifies 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 |
optimum | Specifies the optimum numeric value. | Optional |
form | Specifies 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:
Meter tag without min and max attributes
Disk usage:
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:
Meter tag without min and max attributes
Disk usage:
Try it yourself
Subscribe
Join the newsletter to get the latest updates.