HTML DROPDOWN LIST with programming examples.

HTML TUTORIAL N0:12
HTML DROPDOWN LIST
A HTML Dropdown List is an inline element, it is control that provides a menu of options.
It uses any element to open the dropdown menu, HTML dropdown is a list of options, we can also see menu navigation of any website.
In HTML Dropdown List, the <select> element defines an HTML dropdown list.
It should enclose multiple <option> element with the value attribute for each.
HTML Dropdown List Attributes
multiple: If we use ‘multiple’ attributes in HTML Dropdown List, then the user can select multiple values from the dropdown list. This attribute does not require a value, it only needs to be present at the start tag.
Examples of HTML Dropdown List
<!DOCTYPE html> <html lang="en"> <head> Â <meta charset="UTF-8"> Â <meta http-equiv="X-UA-Compatible" content="IE=edge"> Â <meta name="viewport" content="width=device-width, initial-scale=1.0"> Â <title>Dropdown List</title> </head> <body> <select name="Dropdown" id="sample"> Â <option value="">Home</option> Â <option value="">Privacy Polacy</option> Â <option value="">Desclamir</option> Â <option value="">Sitemap</option> Â <option value="">About Us</option> Â <option value="">contact Us</option> </select> </body> </html> |
Output of HTML Dropdown List
![]() |
Multiple Option Allowed
Here we see the example of ‘multiple’ attributes, when we use multiple attributes in HTML Dropdown List, it shows multiple content in one time. As you can show in below example of multiple attributes.
Example of Multiple Attributes
<!DOCTYPE html> <html lang="en"> <head> Â <meta charset="UTF-8"> Â <meta http-equiv="X-UA-Compatible" content="IE=edge"> Â <meta name="viewport" content="width=device-width, initial-scale=1.0"> Â <title>Dropdown List</title> </head> <body> <select name="Dropdown" id="sample" multiple> Â <option value="">Home</option> Â <option value="">Privacy Polacy</option> Â <option value="">Desclamir</option> Â <option value="">Sitemap</option> Â <option value="">About Us</option> Â <option value="">contact Us</option> </select> </body> </html> |
Output of above Example
![]() |
In this tutorial we learned HTML Dropdown List with multiple attributes, and in next tutorial we will learn a new topic in HTML. I hope you understand this tutorial, If you have any question you ask in comment box.
Also Read This-
- HTML Style and Color with examples.
- HTML Image full tutorial with examples.
- HTML Table full tutorial with examples.
- HTML List with example.
- HTML Description List.
- HTML Dropdown List example.
- HTML Dropdown List elements and attributes.
3 Comments
litter · September 11, 2022 at 2:01 am
І know this if off topic but I’m looking into startÑ–ng my own á´¡eblog
and was curious what all is needed to get setup?
I’m assᥙming having a Ьlog like youгs would cost a pretty penny?
I’m not very web savvy so I’m not 100% sure. Any recommendations or adѵice would be greatly appreciated.
Kudos
zoritoler imol · November 2, 2022 at 12:04 pm
I believe other website proprietors should take this website as an model, very clean and excellent user genial pattern.
Quintin Davanzo · January 16, 2023 at 9:32 am
As a Newbie, I am always searching online for articles that can be of assistance to me. Thank you