step
step
This page has been flagged with the following issues:
High-level issues:
W3C Recommendation
Summary
Specify the increment for input with types number, time, or range
| Applies to | HTMLInputElement |
|---|
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.
Examples
A slider with a range from 1-12 that increments by 3.
HTML
<input type="range" min="1" max="24" step="3" />
View live exampleA form input for a number between 0 and 15 that increments by 3.
HTML
<input type="number" min="0" max="15" step="3" />
View live exampleRestricting time input to half-hours.
HTML
<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 information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.7.3.11
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic Support | 16 | Unsupported | 10 | 12.0 |
5.1 |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic Support | ? | ? | ? | ? | 10 | ? | ? | ? |
See also
Related articles
HTML
- step
External resources
- http://dev.opera.com/articles/view/new-form-features-in-html5/#input-datetime
- http://www.quirksmode.org/html5/inputs.html
Related pages (MSDN)
This article contains content originally from external sources.
Portions of this content come from the Mozilla Developer Network
: Article
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This content was originally published on DevOpera, Opera's Developer Network. .
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here