HTML and CSS Reference
Figure 3-11. Dates prior to March 15, 2011 are not selectable when the min attribute is used in
3.4 Number Inputs
You want to present a user with a form in which to enter a number—for example, to
enter the quantity of an item in an order form.
Use the input element with the HTML5 type value of number :
<p><label>Quantity <input type="number" name="quantity"></label></p>
As you may have guessed, the number input type restricts the value to a valid
number—a floating-point number, to be specific.