O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

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

10.16 List Boxes

Next up is the list box control. List boxes are similar to pull-down menus, so we won’t have to start from scratch in describing them. They both enable the user to select an option from a list of options.

As you know, pull-down menus collapse after the user selects an option. With a list box, the list of options remains viewable after the user selects an option. For example, here’s what the dorms input control looks like implemented as a list box instead of a pull-down menu:

A drawback of a list box is that it takes up more space. So if you have lots of options, you should probably use a pull-down menu rather than a list ...

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