English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Explain the attributes of <select> and <option> tags. - Computer Applications

Advertisements
Advertisements

Question

Explain the attributes of <select> and <option> tags.

Answer in Brief

Solution

<Select> Tag

The <select> tag is used to create dropdown list box in HTML. It provides a list of various options as a dropdown list. This element is more helpful when a number of options are to be displayed in a limited space. The <option> tag is used to specify list items.

Attributes of <Select> tag:

1. Name – Provide the name to the control, which is sent to the server.

2. Size – Determine the style of dropdown list box.

  • Size = 1 dropdown list box
  • Size = 2 List box

3. Multiple – Allows user to select multiple values:

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]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 11 TN Board
Chapter 12 HTML - Adding multimedia elements and Forms
Evaluation | Q 5. | Page 284
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×