With HTML, you can easily create a simple drop down list of items to get user input in HTML forms. Use the <select> element for this, which is a select box, also called drop down box, with option to list down items.
Also, you can set the default value from the dropdown list of items in HTML forms. For that, add selected in the <option> tag for the value you want to preselect.
You can try to run the following code to learn how to set the default value for HTML <select> element −
<!DOCTYPE html> <html> <head> <title>HTML Select Element</title> </head> <body> <p> Select any one:</p> <form> <select name = "dropdown"> <option value = "Java">Java</option> <option value = "Discrete Mathematics" selected >Discrete Mathematics</option> <option value = "Chemistry">Chemistry</option> </select> </form> </body> </html>