HTML Selected Attribute
The Selected is an attribute of the <option> element, which is used to define the default selection in a dropdown-list.
When any option uses this attribute, then that option should be pre-selected and displayed first, when the web page loads.
Example: The following example uses the Selected attribute in the <option> tag with the Jaguar value.Test it Now
Example 2: The following example uses the Selected attribute in the <option> tag with the Pomegranate value.Test it Now
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week