According to html5.org, the \"number\" input type\'s \"value attribute, if specified and not empty, must have a value that is a valid floating point number.\"
You can use the step attribute to the input type number:
step="any" will allow any decimal. step="1" will allow no decimal. step="0.5" will allow 0.5; 1; 1.5; ... step="0.1" will allow 0.1; 0.2; 0.3; 0.4; ...