HTML <input> step attribute

Definition and Usage

step The attribute specifies the interval between valid numbers in the <input> element.

Example: If step="3", valid numbers can be -3, 0, 3, 6, and so on.

Tip:step The attribute can be used with the max and min attributes to create a range of valid values.

Note:step The attribute applies to the following input types:

  • number
  • range
  • date
  • datetime-local
  • month
  • time
  • week

Example

An HTML form that includes an input field with a specified valid number spacing:

<form action="/action_page.php">
  <label for="points">Points:</label>
  <input type="number" id="points" name="points" step="3">
  <input type="submit">
</form>

Try It Yourself

Syntax

<input step="number">

Attribute Value

Value Description
number Specifies the spacing between valid numbers in the input field. The default is 1.
any

Browser Support

The numbers in the table indicate the first browser version to fully support this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
6.0 10.0 16.0 5.0 10.6

Note:step Attributes are new properties in HTML5.