<!DOCTYPE html> <html> <body> <p> Depending on browser support:<br> Numeric restrictions will apply in the input field. </p> <form action="action_page.php"> Quantity (between 1 and 5): <input type="number" name="quantity" min="1" max="5"> <input type="submit"> </form> <p><b>Note:</b> type="number" is not supported in IE9 and earlier.</p> </body> </html>