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 Select Boxes

Select boxes are perfect for offering your visitors a choice from a given set of options. They are most often rendered as drop-down lists. If you give the user the option to select multiple answers, the select box will render as a box of items with a scroll bar Image.

Image Select boxes are made up of two HTML elements: select and option. You set the common name attribute in the select element, and you set the value attribute in each of the option elements.

<label for="state">State:</label><select id="state" name="state">     <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