How to set default value for range slider

By default, the minimum value of input type='range' is 0 and the maximum value is 100. We can also set the minimum and the maximum value of the input slider 🎚️ adding the min and max attributes to the input type='range' element.

<input type='range' min='50' max='250'>

Well, Let's see an example. Click on the Try it Yourself button to see how it works.

show input type range value
0
Try it Yourself »

Conclusion

In this article, you have learned How to set default value for range slider .