HTML min Attribute

The min attribute of the <meter> element is used to set the lower bound for <meter>. However, the <meter> element is used to measure data with a give range like water impurity level and it is set using the min and max attribute.


For obvious reasons, the min value is less than the max value. The default is 0. Following is the syntax −

<meter min="num">

The num above is a number in floating-point that sets the min attribute of the <meter> element.


Let us now see an example to implement the min attribute of the <meter> element −

 Live Demo

<!DOCTYPE html>
<h2>Water Levels</h2>
<p>Impurity Level <meter min="0" low="50" high="95" max="100" value="85"></meter></p>
<p>TDS Level <meter min="0" low="20" high="80" max="100" value="60"></meter></p>


This will produce the following output −

In the above example, we have displayed meter for water levels using the <meter>. For minimum value of the meter, we have used the min attribute −

<meter min="0" low="50" high="95" max="100" value="85"></meter>