selected Attribute is used to specify which option should be by default selected when the page loads. The selectedIndex property sets or returns the index of the selected option in a drop-down list. This is a boolean attribute. The th:selected attribute is used to pre-select an option from a drop-down list in HTML documents. How would the sudden disappearance of nuclear weapons and power plants affect Earth geopolitics? Note: If no option is selected, the selectedIndex property will return -1. Did "Antifa in Portland" issue an "anonymous tip" in Nov that John E. Sullivan be “locked out” of their circles because he is "agent provocateur"? Stack Overflow Public questions & answers; Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Jobs Programming & related technical career opportunities; Talent Recruit tech talent & build your employer brand; Advertising Reach developers & technologists worldwide; About the company The