Inputs - numbers

Back to the index.

Number type

Fields especially for numbers.

There are three issues here:

  1. Does the browser offer some sort of specialised control? Not required.
  2. Does the browser restrict user input by disallowing letters?
  3. Does the browser validate the field automatically when the form is submitted?

Range type

Gives a slider widget to select a number from a specified range with a specified step and a specified default value.

The output trick to the right works only in Opera.

Min and max attributes

This number type has min="10" and max="17". The range type above also have min and max set.

Step attribute

This field requires numbers and has step=3.