Page

Tuesday, 26 March 2019

dropdown menu in html||luv yadav||hishma naaz||


 <HTML>
 <HEAD>
 <TITLE> Selectbox Control Form</TITLE>
 <BODY>
 <form>
   <select name="dropdown">
          <option value="Maths" selected> Maths </option>
          <option value="Physics"> Physics </option>
  </select>
 </form>
 </BODY>
 </HEAD>
 </HTML>




For making drop-down list we use <select> tag (<select name= "drop-down") 

Drop-down list appears when clicking on form element and allows the user to choose one of the options.

The <option> tag is used to define the possible options to choose from. The tag is put into <select> tag.

The first option from the options’ list is selected by default. To change predefined option "selected" attribute is used. ( Option value = "maths" selected)
by hishma naaz






No comments:

Post a Comment