<optgroup> </optgroup>

PURPOSE: A tag that allows you to group choices of a selection box when you have a long list of options.

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>
<p>
Choose a selection:
<select>
<optgroup label="HTML Text Tags">
<option value ="bold">Bold</option>
<option value ="teletype">Teletype</option>
</optgroup>
<optgroup label="CSS Tags">
<option value ="margins">Margins</option>
<option value ="font">Font</option>
</optgroup>
</select>
</p>
<p>
<input type="submit" value="Send" />
<input type="reset" value="Reset" />
</p>
</form>
</body>
</html>


The above code produces the following email form:

Choose a selection:


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples