HTML5: How to specify that multiple options can be selected at once?
Solution:
HTML Code:
Explanation:
- This HTML code defines a webpage with a form and a dropdown menu.
- The form is set to submit data using the POST method to a specified URL.
- The dropdown menu allows users to select multiple options simultaneously.
- Each option in the dropdown menu represents an animal.
- The multiple attribute is added to the <select> tag, indicating that multiple options can be selected at once.
- The form includes a submit button for users to submit their selections.
- All selected options will be submitted to the specified URL when the form is submitted.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.