The HTML5 meter Tag
The HTML5 <meter> tag is also referred to as gauge, for those who are into creating HTML documents. It is primarily used in providing definition regarding the scalar measurement for a specific range or fractional value. Examples of this are disk usage or details about the relevance of the results for a particular query.
One thing that has to be highlighted when using the HTML5 <meter> tag is that it is not used to indicate progress. This is very different from a progress bar. For such function, the HTML5 <meter> tag is not used but instead, the <progress> tag should be utilized.
The HTML5 <meter> tag is newly introduced in HTML5 and it is non-existent in HTML4.01.
Using the HTML5 <meter> tag is not complicated at all since it is easy to pair it up with the Global Attributes and Events Attributes in HTML5. However, when it comes to web browsers, the HTML5 <meter> tag is supported only by Opera and Google Chrome. All others do not work well with it.
The attributes for HTML5 <meter> tag are indicated below:
Attribute |
Value |
Description |
form |
form_id |
It is included if the <meter> element is part of one or more forms |
high |
number |
It is essential in determining the range that is regarded as a high value |
low |
number |
It is essential in determining the range that is regarded as a low value |
max |
number |
It is used in setting the maximum value for the range |
min |
number |
It is used in setting the minimum value for the range |
optimum |
number |
It is used in specifying the value of the optimal value of the gauge |
value |
number |
This is required because it is the one that indicates the current value of the gauge |