This page is Not Ready

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

step

Summary

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`.

Examples

A 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" />​​​​​​​​​​​​​​​​​​​​

View live example

Restricting time input to half-hours.

<input type="time"  step="1800" />

View live example

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

See also

Related articles

HTML

External resources

Related pages

Attributions