html input type text pattern decimal numbers only code example Example: input type that allows float number <input type="number" step="0.01">