Specify the increment for input with types number, time, or range
Applies to [HTMLInputElement](/html/elements/input)When `input type="range"`, `input type="date"`, or `input type="number"` is specified, the default increment from `min` to `max` is 1. Override this default with a value in `step`.
ExamplesA slider with a range from 1-12 that increments by 3.
<input type="range" min="1" max="24" step="3" />
A form input for a number between 0 and 15 that increments by 3.
<input type="number" min="0" max="15" step="3" />
Restricting time input to half-hours.
<input type="time" step="1800" />
Usage
* when used for input type="time", value must be in seconds
Notes Remarks
The following example shows the use of the min, max, and step attributes.
Syntax Standards informationstep
Mozilla Developer Network : Article
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This content was originally published on DevOpera, Opera's Developer Network. .
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4