HTML - low Attribute



The HTML low attribute indicates the upper limit of the lower range. It is also used to specify the range where the fractional value (or the value of the gauge) is considered to be a low value.

It is the upper numerical limit of the lower end of the measured range. The value of the lower attribute must be greater than the minimum value (that is, the min attribute) and less than the higher value and the maximum value (that is, high attribute, max attribute).

If it is not used within the <meter> tag or less than the minimum value, then the low attribute value will be equal to the minimum value.

Syntax

Following is the syntax of low attribute −

<meter low= "value"></meter>

Example

In the following example, we are using the low attribute with the meter tag.

<!DOCTYPE html>
<html lang="en">
<head>
   <title>HTML 'low' attribute </title>
</head>
<body>
   <!--HTML 'low' attribute-->
   <p>Example of the HTML 'low' attribute</p>
   <label for="">Rahul makrs in English</label>
   <br>
   <meter low="70" max="100" high="90" value="78"></meter>
   <br>
   <label for="">Rahul makrs in Math</label>
   <br>
   <meter low="80" max="100" high="90" value="80"></meter>
   <br>
   <label for="">Rahul marks in Computer</label>
   <br>
   <meter low="60" max="100" high="80" value="62"></meter>
</body>
</html>

On running the above code, the output window will pop up displaying the meter reading on the webpage.

Example

Considering the another scenario, where we are going to run the script along with the low attribute.

<!DOCTYPE html>
<html lang="en">
<head>
   <title>HTML 'low' attribute </title>
</head>
<body>
   <!--HTML 'low' attribute-->
   <p>Example of the HTML 'low' attribute</p>
   <label for="">Aman old marks</label>
   <br>
   <meter high="80" low="65" min="0" max="100" value="70" id='aman'></meter>
   <br>
   <br>
   <span id='demo'></span>
   <br>
   <br>
   <button onclick="Rectify()">Update marks</button>
   <br>
   <p>Click on the above button to rectify the old marks.</p>
   <script>
      function Rectify() {
         var l = document.getElementById('aman');
         var low = l.low;
         l.low = 70;
         var res = document.getElementById('demo');
         res.innerHTML = "Aman marks has been updated from " + low + " to " + l.low;
      }
   </script>
</body>
</html>

When we execute the above script, it will generate an output consisting of the meter reading along with a click button on the webpage. when the user clicks the button the event gets triggered and changes the meter reading.

html_attributes_reference.htm
Advertisements