Web Design

(Nancy Kaufman) #1

260


Add Radio Buttons ................................................


4 Type value=”?”, replacing
? with a value for this radio
button.


5 Type id=”?”, replacing?
with an appropriate ID value.


6 Type />.


1 In your editor, open an HTML
page that contains a form.


2 Type <input
type=”radio”.


3 Type name=”?”, replacing?
with a descriptive name for
the set of radio buttons.


Add Radio Buttons


A


set of mutually exclusive options can be added to your page through radio buttons. In code,
radio buttons and check boxes are almost identical: Both use the <input> tag, and both

require name and value attributes. As with check boxes, a set of radio buttons need to all have


the same name. The only difference is that the type value is now set to radio. Also, users can


select as many check boxes as they want, but they can select only a single radio button within a


group. As soon as a second button is chosen, the prior one deselects.


1


2 3


4 5 6

Free download pdf