Which HTML attribute on an <input> element specifies the increment for a number field?

The story behind the answer

The HTML attribute that specifies the increment for a number field is `step`.

Used with `<input type="number">` or `<input type="range">`, `step` controls the spacing between valid values and usually determines how far a spinner button moves. For example, `step="0.5"` permits values such as 1, 1.5, and 2. The browser also uses the attribute during constraint validation.

The default step for a number input is 1, so decimal values may be rejected unless a suitable step is supplied. Developers can use `step="any"` when arbitrary numeric precision is acceptable. The `min` and `max` attributes are commonly confused with `step`: `min` sets the lower limit, while `max` sets the upper limit.

The attribute is also relevant to date, time, month, week, and range controls, where its unit depends on the input type. It does not determine whether text matches a pattern; that job belongs to `pattern`, which is intended for text-like inputs.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: