HTML input number and read only To make a HTML input read only use this code: <input type="text" value="readonly" readonly> Try it: To make a HTML input type to a number use this code: <input value="0" type="number"> Try it: