A complete guide to the <input type="number">

A complete guide to the HTML number input. For Chrome/Edge and Safari. For Firefox.

Ollie Williams explains how to remove the spinner arrows via CSS, how attributes like step, min and max affect validation, and how browser behavior around decimal separators and inputmode varies. Although the number input has received criticism for credit card or zip fields, many of the earlier accessibility bugs have been addressed.

olliewilliams.xyz/blog/guide-to-html-number-input

Tags: html, a11y