![]() |
|
You use radio buttons if you want a user to choose one (and only one) option out of several alternatives, for example, to tell you which operating system is in use. If you only want to select more than one option at a time, you should use checkboxes instead. To set up a radio button, use the <input> tag and set the type attribute to radio. A little example:
The user can only pick one of the options. To set up a default value, set the checked attribute. All radio buttons must have the same name attribute; this allows the browser to group the radio buttons so that a user can only select one button at any one time. A program can use the value attribute to process the form. |
More information Radio buttons |