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 betweenminandmax(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 ofminandmax, it takes the value of the closest extreme. -
minspecifies the minimum value it can take. It must be less thanmaxand by default it is 0. -
maxspecifies the maximum value it can take. It must be greater thanminand by default it is 1. -
lowspecifies the value beyond which the metric is considered to have a low value. It must be greater thanminand less thanhighandmax. If it is not specified or its value is less thanmin, it takes the value ofmin. -
highspecifies the value beyond which the metric is considered to have a high value. It must be less thanmaxand greater thanlowandmin. If it is not specified or its value is greater thanmax, it takes the value ofmax. -
optimumspecifies the value that is considered optimal for the metric. It must be contained betweenminandmax. 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 theidof 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 for-id for better accessibility.
- Type: block
- Self-closing: No
- Semantic value: No
Top comments (0)