-----------------------------------------------------------------------------------------------
<html><!--root tag-->
<head><!--used for meta tag-->
<title><!--title tag-->
form with optgroup and select
</title>
</head>
<body><!--is a container-->
form <br>
<form><!--opening of form tag-->
<label for="stream">choose the subject</label>
<!--defines label-->
<select name="stream"><!--assigns name.it is same as given in label-->
<optgroup label="MGMT">MGMT<!--creates first category-->
<option value="account">account</option><!--value-->
<option value="eco">eco</option><!--value-->
</optgroup>
<optgroup label="science">Science<!--creates second category-->
<option value="Physics">Physics</option><!--crates value-->
<option value="Chemistry">Chemistry</option><!--creates value-->
</optgroup>
</select>
</form>
</body>
</html>
No comments:
Post a Comment