Web4College

HTML min attribute

min attribute specifies the minimum value in the input field or meter element.

Example
Try it
<p>Temperature (celcius): <input type="number" min="0" max="10"></p>
<p>Radius (cm):<input type="number" min="0" max="2" ></p>

Temperature (celcius):

Radius (cm):

If the user enters the value less than the minimum value, then the form is not submitted and it forces the user to select minimum value.

Attribute values

All possible values of min attribute

The value of this attribute is a floating point number.

Related Tags

The tags that support min attribute

<input> tag

Input element allows the user to enter data in the form. This element is used in the form element. It supports the min attribute.

Example
Try it
<p>Upload Video: <input type="file" accept="video/*"><p>

<meter> tag

It represents the completion of a task in the form of a bar for known range value. For instance, the progress of a battery being charged.

Example
Try it
<meter min=0 max=150 value=70 title="kilogram">70</meter>

It indicates that the value can not be negative. value attribute represents the current value of the meter.