Now we are looking at menu selecting. The purpose is to mainly make a list of items and can be used in forms for options. Think of it as having multiple choices and can be done instantly. It’s like picking out your interests or anything of that nature. In order to perform this, you will need the <select> tag to get it to work. There are items that are required and some that are optional but that comes with the territory.

List of <select> tag attributes
select The beginning and ending tags are needed. It lists the options.
name The name of list. Information that is required when submitting a form.
<Option> This gives you a choice of what you use on your form, commonly used for interests.
selected Determines pre-selected item of list (uses inside <option> tag).
multiple Allows to select more than one item.
size Determines a quantity of displayed lines.

Here is the tag below on how it looks in three different samples. These show you how they work and you also see it in live formation.

Examples


<select name=”sports”>
<option>MLB</option>
<option>NFL</option>
<option>NBA</option>
<option>NHL</option>
<option>Other</option>
</select>


Simple selection list.

<select name=”sports” multiple>
<option>MLB</option>
<option>NFL</option>
<option>NBA</option>
<option>NHL</option>
<option>Other</option>
</select>


List with multiple selection.

<select size="3" name=”sports” multiple>
<option>MLB</option>
<option>NFL</option>
<option>NBA</option>
<option>NHL</option>
<option>Other</option>
</select>


List with multiple selection and determined height.

This should help you better understand how this works. I recommend using this if you are having people fill out a survey or something to that nature.

HTML Forms menu.