The step
attribute on an <input> tag sets the stepped increment value for the input element.
This attribute applies to input elements of type number
.
A step
attribute on a number <input> element.
The number control increments and decrements in intervals of 5.
<form action="/tutorial/action.html">
<input type="number" name="number" step="5">
<br /><br />
<input type="submit">
</form>
The step
attribute specifies the value to be added or deducted in an input element.
The default step value is 1.
This attribute applies to these input types:
<input step="number | any">
Value | Description |
---|---|
number | The increment or decrement interval. A numeric value. |
any | The number input value may increase or decrease with no specific step value. |
Here is when step
support started for each browser:
Chrome
|
6.0 | Sep 2010 |
Firefox
|
16.0 | Oct 2012 |
IE/Edge
|
10.0 | Sep 2012 |
Opera
|
10.6 | Jul 2010 |
Safari
|
5.0 | Jun 2010 |
Back to <input>