<INPUT ...>TYPETYPE = RADIO
RADIO is used to create a series of choices of which only one can be selected.
The term "radio button" comes from the buttons for the radio in an automobile, where selecting one radio station automatically de-selects all the others.
HTML radio buttons are created by using several
<INPUT TYPE=RADIO>
| this code | produces this |
<FORM ACTION="../cgi-bin/html/mycgi.pl"> What size pizza?<P> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="S">small<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="M">medium<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="L">large<P> <INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |
note that it is the content of the VALUE
If one of the items should be the default selection, use the
CHECKED
| this code | produces this |
<FORM ACTION="../cgi-bin/html/mycgi.pl"> What size pizza?<P> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="S" >small<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="M" CHECKED>medium<BR> <INPUT TYPE=RADIO NAME="pizzasize" VALUE="L" >large<P> <INPUT TYPE=SUBMIT VALUE="submit"> </FORM> |
If no CHECKED
TYPE=PASSWORD >>>