HTML optimum attribute

optimum attribute gives the optimum value in meter element.

Example

<!--if the value falls above the high value, then the color of bar changes--->
 <p>Cary's weight: <meter min=0 max=150 value=70 title=kilogram high=78>100</meter></p>
 <p>Cary's weight: <meter min=0 max=150 value=100 title=kilogram high=78 optimum=90>100</meter></p>
Try </>

meter attribute value

The value of this attribute is a valid floating point number.

  • If the optimum value is higher than the high value, then higher the value the better it will be.

  • If the optimum value is less than the low value, then lower the value the better it will be.

  • It the optimum value is in between the low and the high values, then middle values are good.

  • As in the above example, the optimum value is greater than high. All values that are greater than 78 are optimum.

Related Tags

The tags that support optimum attribute are given below.

<meter> tag

meter represents the completion of a task in the form of a bar for known range value. For instance, the progress of a battery being charged.

See the above given example.



Was this article helpful?

 

Email:

Message:

Get the newsletter