Skip to main content
step property

Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.

This property is read/write.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section Internet Explorer 10



object.step = ptr
ptr = object.step


Property values

Type: DOMString

A string containing a numeric value.

Standards information


Anything outside that range or an odd number will not be submitted, and an error message will be displayed.

The following example shows the use of the min, max, and step attributes.

Enter an even number between 0 and 100: <input title="Enter an even number" type="number" min="0" max="100" step="2"> <input type="submit">

See also

input type=range