DOM Interfaces

HTMLMeterElement

Represents a scalar measurement in a known range, with low, high and optimum thresholds. It does not represent task progress. Supply meaningful units or context outside the numerical gauge. Example result: 7.

Formal Syntax & Structure

html syntaxhtml
const element = document.getElementById('demo'); // HTMLMeterElement

Return Value

HTMLMeterElement

An existing HTML DOM object associated with the meter element in this example; this interface is a type, not a function return contract.

Working Example

Example Snippethtml
<meter id="demo" min="0" max="10" value="7">7 of 10</meter><p>  Result:  <output id="result"></output></p><script>  const e = document.getElementById('demo');  const result = value => { document.getElementById("result").textContent = String(value); };  result(e.value);</script>
HTML Reference