Radio buttons are useful for selecting any one choice from options. Usually these are used inside html forms( <form> ... </from> ). You may have noticed such items during online exams and questionnaire, gender selection, favorite selection, etc. Here I'll show you an example radio button used for selecting my favorite car:
Syntax:
<input type="radio" name="favorite" value="bmw">BMW<br/>
<input type="radio" name="favorite" value="benz">Benz<br/>
<input type="radio" name="favorite" value="audi">Audi<br/>
<input type="radio" name="favorite" value="ferrari">Ferrari
Output: Syntax:
<input type="radio" name="favorite" value="bmw">BMW<br/>
<input type="radio" name="favorite" value="benz">Benz<br/>
<input type="radio" name="favorite" value="audi">Audi<br/>
<input type="radio" name="favorite" value="ferrari">Ferrari
BMW
Benz
Audi
Ferrari
No comments:
Post a Comment