HTML: input type="range"

A range input lets users choose a numeric value by moving a slider between a minimum and maximum.

What you will learn

Minimal example

<label for="volume">Volume: <output id="volume-value">50</output></label>
<input id="volume" name="volume" type="range"
       min="0" max="100" step="1" value="50">

Use a label to explain the meaning and units. If the exact value matters, show it in an associated output and update it when the slider changes.

Common mistakes