Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

HTML | DOM Meter high Property

  • Difficulty Level : Basic
  • Last Updated : 09 Aug, 2021

The DOM Meter high Property is used to set or return the value of the high attribute in a gauge. The high attribute is used to specify the range where the value of gauge is considered to be of high value. 
The high value would be less than the max attribute but more than the min and low attribute values.
Syntax: 
 

  • It returns the high property. 
     
meterObject.high
  • It is used to set the high property. 
     
meterObject.high = number 

Property Values: It contains the value i.e number which specifies the floating point number that represents the high value.
Return Value: It returns a string value which represents the floating point number that is to be considered high value. 
Example-1: This Example sets the high Property
 

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
      DOM Meter Object
  </title>
</head>
 
<body>
    <h1>
      GeeksforGeeks
  </h1>
    <h2>
      DOM Meter high Property:
  </h2> Sachin's score:
 
    <!-- assigning id to meter with
        properties. -->
    <meter value="5"
           min="0"
           max="10">
        5 out of 10
    </meter>
 
    <br>Laxma score:
 
    <!-- meter tag using value property. -->
    <meter id="GFG"
           min="0"
           low="40"
           high="60"
           max="100"
           value="65">
  </meter>
    <br>
 
    <button onclick="Geeks()">
        Submit
    </button>
 
    <p id="sudo"
       style="font-size:25px;
              color:green;">
  </p>
 
 
    <script>
        function Geeks() {
 
            // Accessing 'meter' tag.
            var g =
                document.getElementById(
                  "GFG").high;
            document.getElementById(
              "sudo").innerHTML = g;
        }
    </script>
 
</body>
 
</html>

Output: 
Before Clicking On Button: 
 



After Clicking On Button: 
 

Example-2: This Example sets the high Property
 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
      DOM Meter Object
  </title>
</head>
 
<body>
    <h1>
      GeeksforGeeks
  </h1>
    <h2>
      DOM Meter high Property:
  </h2> Sachin's score:
 
    <!-- assigning id to meter with
        properties. -->
    <meter value="5"
           min="0"
           max="10">
        5 out of 10
    </meter>
 
    <br>Laxma score:
 
    <!-- meter tag using value property. -->
    <meter id="GFG"
           min="0"
           low="40"
           high="60"
           max="100"
           value="65">
  </meter>
    <br>
 
    <button onclick="Geeksr()">
        Return
    </button>
    <button onclick="Geekss()">
        Set
    </button>
 
    <p id="sudo"
       style="font-size:25px;
              color:green;">
  </p>
 
 
    <script>
        function Geekss() {
 
            // Set 'meter' tag.
            var g =
                document.getElementById(
                  "GFG").high = "70";
           
            document.getElementById("sudo").innerHTML =
              "The value of the high attribute was changed to "
            + g;
        }
 
        function Geeksr() {
 
            // Accessing 'meter' tag.
            var g =
                document.getElementById("GFG").high;
            document.getElementById("sudo").innerHTML =
              "The value of the high attribute was changed to "
            + g;
        }
    </script>
 
</body>
 
</html>
                    

Output : 
Initially: 
 

After Clicking On Return Button: 
 

After Clicking On set Button: 
 

 




My Personal Notes arrow_drop_up
Recommended Articles
Page :