meter optimum attribute
The optimum attribute on the meter element:
- allow you to specify the value of the range considered optimal
- optimum is a specific attribute → can be applied ONLY on the next HTML5 element: meter
- is an optional attribute
If the optimum value is:
- inside the low segment (between low and min values) → the low segment is considered optimal
- inside the high segment (between high and max values)→ the high segment is considered optimal
- between the low and high values → that segment is considered optimal
Note:
- the corresponding color for the optimal region is: green; if the result of the scalar measurement is inside the optimal zone than the color displayed on the meter indicating the result will be green
Examples
<meter | attribute | = | "value(s)" | > | ... | <⁄meter> | example |
---|---|---|---|---|---|---|---|
5. | optimum | = | valid floating-point number | <value="3" optimum="3" max="9"> ... <⁄ > |
Video demonstration meter optimum attribute
HTML5 meter optimum attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: optimum attribute on meter element |
00:05 | optimum attribute allows you to specify the value of the range considered optimal |
00:11 | if the optimum attribute is absent, by default it's value represents the middle point between the min (0.1) value and the max value (0.9), in our case =0.5 which is between the low and high zone, where our value is → will display in green on the meter |
00:26 | the value 0.5 which is between the low and high zone, the optimal zone, displays in green on the meter |
00:30 | example: optimum="0.2" IF optimum is inside the low zone ⁄segment (between min and low) 0.1<=optimum<0.4 THEN the low zone is considered optimal zone → our value 0.5 is outside the optimal zone but next to it → will display in yellow on meter |
00:53 | example: optimum="0.6" IF optimum is between the low and high values 0.4<=optimum<=0.7 THEN the zone between low and high values is considered optimal zone → our value of 0.5 is inside that optimal zone → will display in green on meter |
01:14 | example: optimum="0.8" IF optimum is inside the high zone ⁄segment (between high and max) 0.7<optimum<=0.9 THEN the high zone is considered the optimal zone → our value of 0.5 is outside the optimal zone but next to it → will display in yellow on meter |