Last Updated : 20 May, 2024
The HTML <input type="range"> element creates a slider control for selecting a value from a specified range. Users can move the slider to choose a value between a defined minimum and maximum. This element is often used for adjusting settings like volume, brightness, or other numerical values in web forms. Its default range value is from 0 to 100.
Syntax<input type="range">
Example: This example demonstrates the use of the HTML <input type="range"> element.
html
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input Type Range
</title>
</head>
<body style="text-align:center;">
<h2>HTML <input type="range"></h2>
<form action="#">
<label for="range_val">Select Range</label><br>
<input type="range" id="range_val" value="60">
</form>
</body>
</html>
Output
Supported BrowsersRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4