HTML optimum Attribute
Description
The optimum attribute in HTML is used in conjunction with the <meter> tag, which represents a scalar measurement within a known range, or a fractional value. This could be a disk usage, the relevance of a search result, or any other measurable indicator.
The purpose of the optimum attribute is to indicate the preferable or ideal value for the gauge represented by the <meter> element. This can help with the semantic interpretation of the meter's value, aiding in the visualization of whether the actual value is considered to be within an optimal, suboptimal, or even a critical range.
Here's how it works in practice:
- If the actual value of the
<meter>is close to or equal to the value specified by theoptimumattribute, this is usually represented as a favorable condition (often visually, through the use of color or other indicators). - If the actual value is significantly lower or higher than the
optimum(depending on the context), it may be represented as less favorable or even critical.
The optimum attribute, therefore, helps to provide contextual understanding of the measured value, beyond the mere presentation of a number or a percentage. It adds a layer of semantic information that can enhance the user's interpretation of the data being presented.
Syntax
<meter optimum="number">
Values
- numberA whole or floating point number.
Applies To
Example
Browser Support
The following information will show you the current browser support for the HTML optimum attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.
This attribute is supported in some modern browsers, but not all.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 29th March 2024
