<input type="number">
Widely available
The <input type="number">
HTML element restricts input in the field to numeric data.
To learn more, see
HTMLInputElement: max property,
HTMLInputElement: min property,
HTMLInputElement: step property,
HTMLInputElement: stepDown() method,
HTMLInputElement: stepUp() method,
HTMLInputElement: valueAsNumber property,
HTML attribute: step,
<input type="number"> at MDN.
Compatibility (view on caniuse.com)
- Chrome 7 Released on 2010-10-19
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 29 Released on 2014-04-29
- Firefox for Android 29 Released on 2014-04-29
- Safari 5.1 Released on 2011-07-20
- Safari on iOS 5 Released on 2011-10-12
Specifications
- HTML Standard (#number-state-(type=number)), from HTML Workstream (WHATWG).