HTML Attributes

HTML min attribute

Build a form with the HTML form generator

Sets the lower constraint for eligible inputs or the lower bound of meter. It must use the type's value syntax; the effect depends on the element. Applicable elements include: <input>, <meter>. Check each element’s value rules.

Formal Syntax & Structure

html syntaxhtml
min="1"

Parameters & Attributes

NameTypeDescription
minnumber or type-specific date/timeSets the lower constraint for eligible inputs or the lower bound of meter. It must use the type's value syntax; the effect depends on the element.

Working Example

Example Snippethtml
<label>  Quantity  <input type="number" min="1" max="10" value="1"></label>

Browser Compatibility

Minimum supported versions across modern rendering engines

Blink (modern)
Chrome
4
Yes
EdgeHTML / Blink
Edge
12
Yes
Gecko
Firefox
16
Yes
WebKit
Safari
5
Yes
Presto / Blink
Opera
≤12.1
Yes
Desktop support for min on input only; other elements, input types, individual values and mobile behavior may differ.
HTML Living Standard
HTML Reference