The selected attribute in HTML is used to specify which option should be by default selected when the page loads. This is a boolean attribute. The option that is having the selected attribute will be displayed by default.
Note: This attribute can be used only on <option> element.
Example: Below HTML program to illustrate selected Attribute
Supported Browsers: The browser supported by selected attribute are listed below:
- Google Chrome
- Internet Explorer
- HTML | <option> selected Attribute
- HTML | DOM Option selected Property
- Reading selected webpage content using Python Web Scraping
- How to get multiple selected values of select box in php?
- jQuery | :selected Selector
- AngularJS | ng-selected Directive
- How to change selected value of a drop-down list using jQuery?
- How to know which radio button is selected using jQuery?
- How to get selected text from a drop-down list using jQuery?
- How to iterate through all selected elements into an array ?
- How to get file input by selected file name without path using jQuery ?
- How to reset selected value to default using jQuery ?
- How to change the color of selected text using CSS ?
- How to reset selected file with input tag file type in Angular 9?
- How to show contents of selected row of a table in Bootstrap model using jQuery ?
- HTML | <html> xmlns Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.