Creating Check Boxes and Option Buttons

When the valid responses to a particular prompt will always be one of a few simple options, such as gender or employment status, you will get more consistent and easier-to-evaluate results by using check boxes and option buttons rather than text boxes.

For example, suppose you are asking site visitors a yes/no question such as "Are you interested in receiving our catalog by mail?" If you provide a text box, people might answer the question in any number of ways: y, n, Y, N, yes, no, Yes, No, YES, NO, maybe, Sure, No Thanks, and so on. Tabulating such results would be tedious because a human would have to evaluate each one. But if you provide a check box, there is no doubt: a check mark mean yes, and a lack ...

Get HTML and XHTML Step by Step now with O’Reilly online learning.

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