Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <input> step Attribute

The step attribute on an <input> tag sets the stepped increment value for the input element.

This attribute applies to input elements of type number.

Example

#

A step attribute on a number <input> element.
The number control increments and decrements in intervals of 5.



<form action="/tutorial/action.html">
  <input type="number" name="number" step="5">
 
  <br /><br /> 
  <input type="submit">
</form>

Using step

The step attribute specifies the value to be added or deducted in an input element.

The default step value is 1.

This attribute applies to these input types:


Syntax

<input step="number | any">

Values

#

Value Description
number The increment or decrement interval. A numeric value.
any The number input value may increase or decrease with no specific step value.

Browser support

Here is when step support started for each browser:

Chrome
6.0 Sep 2010
Firefox
16.0 Oct 2012
IE/Edge
10.0 Sep 2012
Opera
10.6 Jul 2010
Safari
5.0 Jun 2010

You may also like

 Back to <input>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides