Drop down menu is another common way to specify input data. For example, selecting a state is often done via a drop down menu. Users can select one or more items in a drop-down menu. Below is an example for a single-selection drop down menu:
Code: <select name=color> <option value="red">Red</option> <option value="green">Green</option> <option value="blue">Blue</option>
Red Green Blue
In this case, the key is color, and the values can be either red, green, or blue, depending on the item selected.
If we want to pre-select a check box, we'll specify "selected" at the end of the <input> tag, such as follows: <input type="checkbox" name="color" value="red" selected>Red<br>
If we want to select multiple items, we specify "multiple" at the end of the <select> tag, i.e., <select name=color multiple>
HTML Tutorial
HTML Tags
Basic HTML Tags
HTML Format
HTML Table
HTML List
HTML Hyperlink
HTML Image
HTML Frames
Special Characters
Tags and SEO
HTML Forms
Text Input
Radio Button
Checkbox
Drop Down Menu
HTML Color Codes Chart
HTML Commands
Site Map
PHP Tutorial
CSS Tutorial