A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/how-to-set-minimum-and-maximum-value-of-range-in-html5/ below:

How to set minimum and maximum value of range in HTML5 ?

How to set minimum and maximum value of range in HTML5 ?

Last Updated : 23 Jul, 2025

In this article. we are going to set the minimum and maximum value of the range in HTML5 by using the min and max attributes in the <meter> element. 

Approach: This can be implemented by using the min and max attributes:

Syntax:

<meter min="number" max="number">

Example: In this example, we will set the maximum and minimum values of the range in HTML5.

HTML
<!DOCTYPE html>
<html>
<body style="text-align:center;">
    <h1>GeeksforGeeks</h1>
    <h2>
        How to set the minimum and
        maximum<br>value of the range
        in HTML5?
    </h2>
    Sachin's score:
    <meter value="5" min="0" max="10" 
           high="6">
        5 out of 10
    </meter>
    <br>Laxma sxore:
    <meter value="0.5" max="1.0" min="0" 
           high="0.6">
        50% from 100%
    </meter>
</body>
</html>

Output:



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