Creating Checkboxes

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

Figure 17.31. Notice how the label text (not highlighted) does not need to match the value attribute. That’s because the label text identifies the checkboxes to the visitor in the browser while the value identifies the data to the script. The empty brackets are for PHP (see tip).

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 ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.