HTML min Attribute

❮ HTML Attributes


<form action="action.php">
<label for="date">Enter a date between (2020-01-01 - 2021-01-01):</label>
<input type="date" id="date" name="date" min="2020-01-01" max="2021-01-01"><br><br>

<label for="quantity">Quantity (between 1 and 10):</label>
<input type="number" id="quantity" name="quantity" min="0" max="10"><br><br>

<input type="submit">


The min attribute should be set to a numeric value that is the low range allowed in the form control.

The maxmax attribute sets the high range.

Standard Syntax

<element value="number" min="number">

Browser Support


Applies to:

The min attribute can be used on the following element:

Element Attribute
<input> min
<meter> min

Attribute Values

Value Description
number Specifies the mainimum value allowed.

More Examples


<p><label for="a">A score:</label>
<meter id="a" min="0" low="40" high="90" max="100" value="60"></meter></p>

<p><label for="b">B score:</label>
<meter id="b" min="0" low="40" high="90" max="100" value="85"></meter></p>
❮ HTML Attributes