Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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 .
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 value="AL">Alabama</option>
<option value="AK">Alaska</option>
...
</select>
We’ll use CSS again to adjust the font size. You can adjust the width, color, and other attributes using CSS, but each browser displays drop-down lists slightly differently.