This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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