HTML <input> type Attribute
Example
<input type="number" name="rate" min="1" max="5">
Meaning
Provides control for entering a number.
Displays a spinner and adds default validation when supported. Displays a numeric keypad in some devices with dynamic keypads.
Following attributes to restrict on entry:
- max - The maximum value allowed
- min - The minimum value allowed
- step - The legal number intervals
- value - The default value(pre entered value)
Standard Syntax
HTML: <input type="number">
XHTML: <input type="number" />
Advertisement