input html only numbers pattern="\d{5}" code example Example: html5 number integer <input type="number" step="1" />