O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required