Define a scalar measurement within a known range in HTML

To define a scalar measurement within a known range or a fractional value, we use tag in HTML. tag is also called as gauge. For disk usages, relevance of query results etc., we use tag in HTML.

The tag is not used to indicate progress bar, If we want to indicate progress bar, we use tag. For best accessibility it?s better to use

Syntax

Following is the usage of tag in HTML ?


Example

Following example where we are trying to define a scalar measurement within a known range using the tag ?




   HTML meter Tag


   6 out of 10
   

gauge value can be seen here

Attributes used in tag

Attributes used in meter tag is shown below ?

  • form ? The value used for form attribute is form_id and it is used to specify that, which form the belongs to.

  • high ? The value used for high attribute is number and it is used to specify the range that is considered as high value.

  • low ? The value used for low attribute is number and it is used to specify the range that is considered as low value.

  • max ? The value used for max is number, and it is used to specify the maximum value of the range.

  • min ? The value used for min is number, and it is used to specify the minimum value of range, by default the min value is 0.

  • optimum ? The value used for optimum attribute is number, and it is used to specify what value is optimal value for the gauge.

  • value ? The value for value attribute is number and it is compulsory required which specifies the current value of gauge.

Example

In this examples we are creating various meters by passing different values to the attributes, min, max, low and, high ?




   

TutorialsPoint

Meter Element

Meter Element With Decimal Value

Meter element , value is below low attribute

Meter element , value is above high attribute

The inequalities that hold the attributes are

  • min

  • if low is specified: min

  • if high is specified: min

  • if optimum is specified: min

  • if both low and high are specified: low

Example

Following is another example ?

        
        
        
   Meter without value   
           
   

Meter with value

Meter with value, min and max attribute

Meter when "min

Meter when "high

Meter when "low

Meter with optimum attribute

Meter with optimum attribute
Updated on: 2023-10-10T14:20:37+05:30

386 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements