Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add scale in slider control in html5 input tag

Tags:

html

Is there any way we could include a scale in slider. I haven't found any attribute to do that.

like image 339
anjo Avatar asked Jan 11 '23 19:01

anjo


1 Answers

To make tick marks on the slider , you will have to use the attribute called list and it should be linked to <datalist> tag of HTML5

<input type=range min=0 max=100 value=50 step=20 list=tickmarks>
<datalist id=tickmarks>
<option>0</option>
<option>20</option>
<option>40</option>
<option>60</option>
<option>80</option>
<option>100</option>
</datalist>
like image 113
Subbu Avatar answered Feb 01 '23 02:02

Subbu