HTML and CSS Reference
In-Depth Information
min="0" max="10" step=".5" value="5"></label></p>
</form>
Discussion
The
range
input type is like
number
in that it restricts the value to a valid floating-point
number, but it has the added caveat that the exact value is not important.
Exact values are important on product order forms and the like, for values like quantity,
so
number
should be used in those cases. The
range
input type is useful in cases of relative
or subjective input, such as assigning a rating to an event or product. To emphasize
this point, the specification requires that the control be rendered as a slider or similar
control, as shown in
Figure 3-15
.
Figure 3-15. The range input type in Opera 11.5
Webkit-based browsers and Opera render a horizontal slider control for the
range
input
type. If a user agent does not recognize this input type, it displays a text input field
instead.
For a browser support reference on the
range
input type, see
Table 3-5
.




