Last Updated : 11 Jul, 2025
The HTML optimum attribute specifies the optimal numeric value for <meter elements. It's an optional attribute used to indicate the ideal or preferred value within a range, providing context for measurement.
Syntax:
<meter optimum = "value"></meter>
Attribute Values: It contains the floating point number which represents the optimal value of the gauge.
Usage: The HTML optimum attribute defines an ideal value within the range of a `<meter>` element, indicating a preferred measurement relative to the low and high values.
HTML optimum attribute ExampleExample: Here is the basic implemantation of HTML optimum attribute.
HTML
<!DOCTYPE html>
<html>
<head>
<title>HTML optimum Attribute</title>
</head>
<body>
<h2 style="color: green;">
HTML optimum Attribute
</h2>
<p>
optimum value below low and high:
<meter value="0.6"
max="0.9"
min="0.1"
optimum="0.1"
high="0.5"
low="0.2">
</meter>
</p>
<p>
optimum value between low and high:
<meter value="0.6"
max="0.9" min="0.1"
optimum="0.4"
high="0.5"
low="0.2">
</meter>
</p>
<p>
optimum value above low and high:
<meter value="0.6"
max="0.9"
min="0.1"
optimum="0.6"
high="0.5"
low="0.2">
</meter>
</p>
</body>
</html>
Output:
Explanation:
In HTML5, use the optimum attribute within the <meter> element to specify the optimal value for a gauge, indicating the preferred measurement within the defined range.
Supported Browsers:The browser supported by value attribute in option tag are listed below:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4