HTML min Attribute is used to specify the lower bound of the gauge. The value of the min attribute must be less than the value of the max attribute. It has a default value which is 0.
Supported Tags
When the min Attribute is present in the input Element. It specifies the minimum value for an <input> element.
Syntax
<input min="number|date">
Example: This example that illustrates the use of min attribute in input element.
HTML
<!DOCTYPE html>
<html>
<body style="text-align:center;">
<h1 style="color:green;">
GeeksForGeeks
</h1>
<h2>
HTML | min Attribute in Input Field
</h2>
<form id="myGeeks">
<input type="number"
id="myNumber"
step="5"
name="geeks"
placeholder="multiples of 5"
min="10">
</form>
<br><br>
<p style="font-size:20px;">
The minimum value for an
input field is 10.
</p>
</body>
</html>
|
Output:
When present in the meter element, it specify the minimum value for a gauge.
Syntax
<meter min="number">
Example: This example illustrates the use of min attribute in a meter element.
HTML
<!DOCTYPE html>
<html>
<head>
<title>
HTML | min attribute
</title>
</head>
<body style="text-align:center;">
<h1>GeeksforGeeks</h1>
<h2>
HTML | min Attribute:
</h2>
Sachin's score:
<meter value="5"
min="0"
max="10"
high="6">
5 out of 10
</meter>
<br>
Laxman's score:
<meter value="0.5"
max="1.0"
min="0"
high="0.6">
50% from 100%
</meter>
</body>
</html>
|
Output:

Supported DOM Properties
The DOM Input Number min Property and the DOM Meter min Property can be used with the HTML min attribute.
Supported Browsers
The browser supported by min Attribute are listed below:
- Google Chrome 4.0
- Edge 12.0
- Firefox 16.0
- Opera 12.1
- Safari 5.0
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!
Last Updated :
15 Jan, 2024
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...