HTML page with optgroup and select tag.

To display different listed data, we have to use select with optgroup.
<html><!--root tag-->

<head><!--used for meta tag-->
    <title><!--title tag-->
        form with optgroup and select

<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 label="science">Science<!--creates second category-->
              <option value="Physics">Physics</option><!--crates value-->
              <option value="Chemistry">Chemistry</option><!--creates value-->


No comments:

Post a Comment