Open In App

What does the multiple attribute specify in HTML Select Tag ?

Last Updated : 20 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The multiple attribute in <select> Tags are used to allow users to select multiple options from a dropdown list. When this attribute is present, users can make multiple selections by holding down the Ctrl (or Command) key while clicking on options, or by dragging to select a range of options.

Syntax

<select multiple>
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>

Key Point of multiple Attribute

Key Point Description
Multiple Selection The multiple attribute allows users to select more than one option from a dropdown list.
User Interaction Users can make multiple selections by holding down the Ctrl (or Command) key while clicking on options or by dragging to select a range of options.
UI Presentation The appearance of the dropdown list may vary depending on the browser and operating system, but it typically includes checkboxes or some visual indication of multiple selection capability.

Features

  • User Interaction: Users can select multiple options by holding down the Ctrl (or Command) key while clicking on options, or by dragging to select a range of options.
  • Form Submission: When the form containing the <select> element is submitted, all selected options are included in the form data, allowing the server-side script to process the multiple selections.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads