It is used to define a scalar measure within a known range or fractional value, for example the percentage of use of a hard disk or the fuel level of a vehicle.
It has several attributes:
valuespecifies the value of the
<meter>and is the only required attribute. It must be between
max(if they are defined). If it has no value or is incorrectly formatted, its value is 0. If it is specified but not within the range of
max, it takes the value of the closest extreme.
minspecifies the minimum value it can take. It must be less than
maxand by default it is 0.
maxspecifies the maximum value it can take. It must be greater than
minand by default it is 1.
lowspecifies the value beyond which the metric is considered to have a low value. It must be greater than
minand less than
max. If it is not specified or its value is less than
min, it takes the value of
highspecifies the value beyond which the metric is considered to have a high value. It must be less than
maxand greater than
min. If it is not specified or its value is greater than
max, it takes the value of
optimumspecifies the value that is considered optimal for the metric. It must be contained between
max. The browser can choose to color the bar differently if the value is above or equal to optimal.
formspecifies the form to which the
<meter>is associated and its value will be the
<form>that is in the same document. If not specified, the
<meter>will look for a
<form>among its parents to associate with. This attribute should only be used when the
<meter>is used to represent the value of some form field, such as an
<input type="number" />.
Between its opening or closing tags, a text will be put that represents the value that it is showing.
It should be used with an associated tag using
id for better accessibility.
- Type: block
- Self-closing: No
- Semantic value: No