<select> and </select>

PURPOSE: To make a drop down option selection box. It can be set to show more than one option and allow for multiple selections if needed.

Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> The Page Title Goes Here </title>
</head>
<body>
<form method="post" action="mailto:somebody@somewhere.com" type="text/plain">
<p>
Choose a selection:
<select name="the selections:">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</p>
<p>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</p>
</form>
</body>
</html>


The above code produces the following form:

Choose a selection:


To set up the menu to display more menu items than one, here is the code:

<select name="the selections:" size="2">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>

Here is how it looks:

Choose a selection:


To have the ability to select more than one item at a time. Just hold down the shift key and select them. Here's the code:

<select name="the selections:" multiple="yes">

Choose a selection:


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples