How to put the selected value on the slider input?

I am also curious of how i can have the text “stick” or “hover” above the slider as it is moved

is there anyway to let slider accept the value 1 as “yes” and 0 to be “no”

I want to build my database to accept yes or no as the input

the slider(s) will be used for accepting or rejecting cookies

help!