Radio Buttons - The <input> Tag

Radio buttons are most often used in cases of "select the best response." To create a radio button, use the <input> tag and set the type attribute to 'radio'.

The main attributes of the radio button are:

If two or more radio buttons have the same name, then they belong to a group. In a group, only one button at a time may be selected.

<input type="radio" name="R1" value="V1" checked>Swimming<br>
<input type="radio" name="R1" value="V2">Biking<br>
<input type="radio" name="R1" value="V3">Hiking<br>
<input type="radio" name="R1" value="V4">Running
Swimming
Biking
Hiking
Running

The term "radio button" comes from the older style car radios that had push buttons for selecting the radio station. Pushing one button would pop out the others, allowing only one at a time to be selected.