HTML <meter>Tag: The HTML<meter>tag specifies a scalar measurement. This is also known as a gauge. The <meter> tag should not be used to indicate progress (as in a progress bar). For progress bars, use the <progress> tag.
HTML <meter>Tag
This HTML meter tag supports both the global and the event attributes.
Syntax: <meter> Text </meter>
Attributes
This tag contains many attributes which are listed below:
- form: It belongs to one or more forms that it belongs too.
- max: It is used to specify the maximum value of a range.
- min: It is used to specify the minimum value of a range.
- high: It is used to specify the range considered to be a high value.
- low: It is used to specify the range value that is considered to be low.
- Optimum: It is used to specify the optimum value for the range.
- value: It is used to specify the required or actual value of the range.
Browser compatibility
The HTML<meter>tag is supported by different types of browsers.
- Chrome-8.0
- Firefox-6.0
- Opera-11.1
- Safari-6.0
- Internet Explorer-13.0
Example:
<!DOCTYPE html> <html> <body> <p>Displaying a gauge:</p> <meter value="2" min="0" max="10">2 out of 10</meter><br> <meter value="0.6">60%</meter> </body> </html>
Output:
Attributes that are supported by the <meter> tag
Attribute | Value | Description |
---|---|---|
form | form_id | Specifies one or more forms the meter element belongs to |
high | number | Specifies the range that is considered to be a high value |
low | number | Specifies the range that is considered to be a low value |
max | number | Specifies the maximum value of the range |
min | number | Specifies the minimum value of the range |
optimum | number | Describes what value is the optimal value for the gauge |
value | number | Specifies the current value of the gauge |