How to set the default value for an HTML <select> element ? Last Updated : 03 Jun, 2025 Comments Improve Suggest changes Like Article Like Report The default value of an HTML <select> element ensures that a specific option is preselected when the form loads. This is achieved by adding the selected attribute to the desired <option> tag. The <select> tag is used to create dropdown lists, while <option> tags define the individual selectable values.The selected attribute is a boolean attribute, meaning that if it is present, the corresponding option is shown as the default choice in the dropdown. This enhances user experience by providing a commonly expected or recommended value, making the form easier and faster to complete.The default selection can also be set dynamically using JavaScript after the page has loaded, allowing for more interactive and personalized forms.Research shows that over 80% of well-optimized forms include default values in dropdown menus to improve usability and reduce input time for users. Syntax: <option value="value" selected>Option Name</option> Example 1: This example illustrates the use of the selected attribute by specifying the pre-selected option that will be displayed first from the drop-down list. index.html <!DOCTYPE html> <html> <head> <title>Set the default value for <select> element</title> </head> <body> <b> How to set the default value for an HTML <select> element? </b> <p>The Starter option will be selected by default</p> <p>Choose your plan below:</p> <select name="plan" id="plan"> <option value="free">Free</option> <option value="starter" selected>Starter </option> <option value="professional">Professional</option> <option value="corporate">Corporate</option> </select> </body> </html> Output: set html select default value Example Output Example 2: This can also be used to add messages like 'Select an Option' in the list. This option would have the hidden and disabled attribute in addition to selected. index.html <!DOCTYPE html> <html> <head> <title>Set the default value for <select> element</title> </head> <body> <b>How to set the default value for an HTML <select> element? </b> <p>The Select an Option would be shown by default.</p> <p>Choose your plan below:</p> <select name="plan" id="plan"> <option value="none" selected disabled hidden>Select an Option</option> <option value="free">Free</option> <option value="starter">Starter </option> <option value="professional">Professional</option> <option value="corporate">Corporate</option> </select> </body> </html> Output: set html select default value Example Output How to set the default value for an HTML <select> element? Comment More infoAdvertise with us Next Article How To Set Default Value In Select using ReactJS? S sayantanm19 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads How to specify the value of an input element using HTML ? In this article, we will set the value of an input element using HTML. The value attribute for <input> element in HTML is used to specify the initial value of the input element. It has different meaning for different input type: The âbuttonâ, âresetâ and âsubmitâ property specifies the text on 1 min read How To Set Default Value In Select using ReactJS? When building forms in ReactJS, it is common to work with select dropdowns where users can choose an option from a list. Sometimes, you may want to set a default value in the select dropdown to pre-select an option when the form loads. In this article, weâll explore different approaches to set a def 3 min read How to reset selected value to default using jQuery? Resetting a selected value to its default in a dropdown or select element is a common requirement in web development to enhance user experience. jQuery, a popular JavaScript library, simplifies this task by providing easy-to-use methods for manipulating DOM elements. By using jQuery, you can quickly 3 min read How to reset selected value to default using jQuery? Resetting a selected value to its default in a dropdown or select element is a common requirement in web development to enhance user experience. jQuery, a popular JavaScript library, simplifies this task by providing easy-to-use methods for manipulating DOM elements. By using jQuery, you can quickly 3 min read How to reset selected value to default using jQuery? Resetting a selected value to its default in a dropdown or select element is a common requirement in web development to enhance user experience. jQuery, a popular JavaScript library, simplifies this task by providing easy-to-use methods for manipulating DOM elements. By using jQuery, you can quickly 3 min read How to get selected text from a drop-down list using jQuery? In this article, we will learn how we can get the text of the selected option in a select tag using jQuery. There are two ways in jQuery that we can use to accomplish this task. Table of Content Using the val() method By using option:selected selector and text() method togehterUsing the val() method 2 min read Like