input type number integer only html code example
Example 1: html input integer and positive
<input type="number" min="0" step="1" />
Example 2: number input html
<input id="number" type="number" value="42">
<input type="number" min="0" step="1" />
<input id="number" type="number" value="42">