English

Which tag is used to specify the list of items in dropdown list box?

Advertisements

Question

Which tag is used to specify the list of items in dropdown list box?

Short/Brief Note
Advertisements

Solution

  • The <select> tag is used to create dropdown list box in HTML.
  • The <option> tag is used to specify list items.

Attributes of <Option> tag:
Selected – Indicate default selection Value – Value to be submitted to server

Example:

<Select name = area size = 1>
<option value = CHN> Chennai </option>
<option value = MDR selected> Madurai </option>
<option value = CBO> Coimbatore </option>
<option value = KKM> Kanyakumari </option>
</Select></p>
shaalaa.com
Working with Forms
  Is there an error in this question or solution?
Chapter 12: HTML - Adding multimedia elements and Forms - Evaluation [Page 284]
Advertisements
Share
Notifications



      Forgot password?
Use app×