HTML min attribute specifies the minimum value for an input element. It is commonly used with input types like number, date, and time to define the minimum acceptable value. The value of the min attribute must be less than the value of the max attribute. It has a default value which is 0.
The HTML min attribute, used with the <input> tag, sets the minimum acceptable value for numerical inputs.
<input min="number|date">
This example illustrates the use of the min attribute in the 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:

Here is the explanation of above-example.
- Here <input> field specifies a minimum value of 10 using the min attribute.
- Utilizes <input type="number"> to allow numerical input.
- Input increments by 5, set by the step attribute.
- Placeholder text prompts users to input multiples of 5, enhancing clarity and usability.
HTML min Attribute with <meter> tag
The HTML min attribute, employed within the <meter> tag, establishes the minimum value for the meter element. This attribute defines the lower bound for the displayed range of values.
HTML min Attribute with <meter> tag Syntax:
<meter min="number">
HTML min Attribute with <meter> tag 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:

HTML min Attribute with <meter> tag Explanation:
- In this example we are used to display visualizations such as progress bars or gauges for Sachin and Laxman's scores.
- The min attribute sets the lowest acceptable value for the meter, ensuring accurate representation.
- Sachin's score is displayed as 5 out of 10, while Laxman's score is presented as 50% out of 100%.
- Enhances data presentation by visually representing the scores within defined ranges for clarity and comprehension.
HTML min Attribute Supported DOM Properties
The DOM Input Number min Property and the DOM Meter min Property can be used with the HTML min attribute.
HTML min Attribute Use Cases:
Here we are using the min and max attributes within the <input> tag, specifying the minimum and maximum acceptable values respectively.
Here we Specify minimum with minlength and maximum with maxlength attributes within the <input> tag to limit character count.
Use the min and max attributes within the <input type="range"> tag to specify the minimum and maximum range values.
HTML min Attribute Supported Browsers
The browser supported by min Attribute are listed below:
Similar Reads
HTML accept Attribute HTML accept Attribute specifies the type of file that the server accepts. This attribute can be used with <input> element only. This attribute is not used for validation tools because file uploads should be validated on the Server.Syntax:<input accept = "file_extension"> Note: This attri
3 min read
HTML accept-charset Attribute The accept-charset attribute is used to define the character encoding and is used for form submission. The default value of the accept-charset attribute is "UNKNOWN" string which indicates the encoding equals to the encoding of the document containing the <form> element. Syntax:<form accept
2 min read
HTML accesskey Attribute The HTML accesskey attribute defines a keyboard shortcut to activate or focus an element.It assigns a keyboard key combination to trigger an element (like a link or button).Browser support and specific key combinations vary (e.g., Alt + key on Windows, Ctrl + key on macOS).Use it sparingly and provi
3 min read
HTML action Attribute The HTML action attribute is used to specify where the form data should be sent on submission. It allows the browser to send the data to the specified location, enabling server-side scripts to process the data and generate a response.Note: It can be used in the <form> element. Syntax:<form
3 min read
HTML align Attribute In HTML, the align attribute is used to control the alignment of elements on a webpage. Whether it's for text, images, or tables, the align attribute helps to position content in relation to its surrounding elements.Syntax<element_name align="left | right | center | justify">Attribute ValuesAt
4 min read
HTML alt attribute The alt attribute in HTML provides alternative text for images, aiding accessibility and providing context for screen readers.Syntax:<img src=" " alt=" " >HTML<html> <body> <h1>GeeksforGeeks Logo</h1> <img src="https://media.geeksforgeeks.org/wp-content/uploads/20190
3 min read
HTML async Attribute The HTML <script> async attribute is used to load and execute external scripts without blocking the rest of the page from loading. This speeds up page load times. It only works with external scripts (when the src attribute is present).Syntax:<script src="path-to-script.js" async></scr
3 min read
HTML autocomplete Attribute The HTML autocomplete Attribute is used to specify whether the input field autocompleted would be on or off. When the autocomplete attribute is set to on the browser will automatically complete the values based on what the user entered before. It works with input fields such as text, search, URL, em
3 min read
HTML autoplay Attribute The HTML autoplay Attribute, a boolean attribute, enables audio or video elements to start playing automatically when the page loads, providing seamless playback without interruption.Syntax: <element autoplay> Supported ElementsIt can be used with <audio> and <video> elements. Elem
2 min read
HTML autofocus Attribute The HTML autofocus attribute is a powerful tool that enhances user experience by automatically setting the focus to a specific element when a webpage loads. Syntax<input type="text" autofocus> Note: This attribute is boolean, meaning it can either be present or absent.Supported TagsElementPurp
2 min read