O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

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 Lists

Check boxes are good for yes/no questions, and option buttons are appropriate when there are a few options to choose from, but what if you have a dozen or more choices? Option buttons for that many choices can take up a lot of space onscreen and can overwhelm a Web visitor.

For situations involving many options, consider a list, also called a menu. A list can contain as many options as needed, yet it takes up very little space on the form.

image with no caption

To create a list, start with a two-sided <select> tag. Within it, place each option in its own <option> tag. Place the text that you want to appear on the list between the opening and closing <option> ...

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