step

Jump to: navigation, search

step

This article is Not Ready.


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

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




























… further results


External resources

Related pages (MSDN)

Attribution

This article contains content originally from external sources.

Portions of this content come from the Mozilla Developer Network cc-by-sa-small-wpd.svg: 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. .