HTML <input> type="range"

The <input> tag with a type="range" attribute creates a range input control. This control is a slider where a value is selected in a range, between a minimum and a maximum value.



An <input> element of type range.
The slider accepts values between 0 and 100 in increments of 10.

The value is 30 PSI
<form oninput="result.value = slider.value">
  <label>Select pressure</label><br/>
  <input type="range" id="slider" 
         min="0" max="100" step="10" value="30"> <br />
  The value is <output name="result" for="slider">30</output> PSI

Using input type="range"

The <input type="range"> creates a range input control.

The default range is 0 to 100, but this can be changed with min and max attributes.

The step attribute is used to define the interval step between the values.

The range initial value is specified with the value attribute.


<input type="range">

Browser support

Here is when type="range" support started for each browser:

4.0 Jan 2010
23.0 Aug 2013
10.0 Sep 2012
10.1 Jun 2009
3.1 Mar 2008

You may also like

 Back to <input>