form with number input html
snippet in html

html number

user4956

<input type="number" id="quantity" name="quantity" min="1" max="5"> 

html input number

user7651


  <label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" 
  id="quantity" name="quantity" min="1" max="5"> 

form with number input html

user641

<input id="number" type="number" value="42">