Meter Element in HTML5
The meter tag is used to markup measurements, specifically a scalar measurement within a known range.
1 2 |
<meter>1 of 10</meter> <meter>2 of 7</meter> |
It could also be used to represent a fractional value like disk usage or percentage of a specific population.
It doesn’t represent an absolute scalar value of arbitrary range like your height or weight, unless of course you’re reporting heights or weights within a known range of heights or weights.
There are 6 attributes you can use with the meter tag.
- value
- min
- max
- high
- low
- optimum
1 |
Your batting average is <meter value=".340" min="0" max="1.000" low=".215" high=".367" optimum="1.000">.340</meter> |
Extra points for baseball fans who know what .340, .215, and .367 signify.