<option> and </option>

PURPOSE: To make the options for a drop down selection box

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 make a option selected by default, use this code:

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


Here is how it looks:

Choose a selection:


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples