<html>
<body>
<p>Peter's score: <meter id="myMeter" value="0.3" high="0.9" low="0.1" optimum="0.5"></meter></p>
<p>Click the button to return the value of the optimum attribute of the gauge above.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
let x = document.getElementById("myMeter").optimum;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>