How to define scalar measurement within a given range in HTML5 ?
In this article, we will learn how to define an element that has a scalar measurement within a known range. It can be used to represent fractional data in a gauge making it easy for the reader to understand the values.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
We will use the <meter> element for defining the gauge that can measure the scalar value. This element has attributes that can be used to define the value to represent, the lower and higher limits of the range and the preferred range of values. The color of the meter changes depending on the value it represents and the browser style.
<meter value="" min="" max=""></meter>
The below example illustrates the <meter> element to define a scalar measurement.