0
How to create switch button for gender male/female user?
I am searching about this I can't find clear codes about this in social media.
2 odpowiedzi
+ 7
1️⃣ Using select :
<select>
<option value="" disabled selected>Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
2️⃣ Using radio :
<h4>Gender :</h4>
<input type="radio" name="group1" value="male" id="a"/>
<label for="a">Male</label><br>
<input type="radio" name="group1" value="female" id="b"/>
<label for="b">Female</label>
+ 5
You could use input of type radio, as shown here: https://www.w3schools.com/tags/att_input_type_radio.asp