Creating Checkboxes

Whereas radio buttons can accept only one answer per set, a visitor can select as many checkboxes in a set as they like. Like radio buttons, checkboxes are linked by the value of the name attribute.

To create checkboxes

1. If desired, type the introductory text (something like Select one or more of the following) for your checkboxes.

2. Type <input type="checkbox".

3. Type name="boxset", where boxset identifies the data sent to the script and also links the checkboxes together.

4. Type value="data", where data is the text that will be sent to the server if the checkbox is marked (either by the visitor, or by you as described in ).

Notice that the label text (not highlighted) does not need to match the value attribute. That’s ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.