Akhil Gupta Posted July 26, 2019 Share Posted July 26, 2019 https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_checked2 Link to comment Share on other sites More sharing options...
Ingolme Posted July 27, 2019 Share Posted July 27, 2019 The <option> element does not have a :checked state, only checkboxes and radio buttons do. Furthermore, <option> elements cannot be styled. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 27, 2019 Share Posted July 27, 2019 (edited) 1 hour ago, Ingolme said: The <option> element does not have a :checked state, only checkboxes and radio buttons do. Furthermore, <option> elements cannot be styled. Actually for HTML5 Quote :checked The :checked pseudo-class must match any element falling into one of the following categories: input elements whose type attribute is in the Checkbox state and whose checkedness state is true input elements whose type attribute is in the Radio Button state and whose checkedness state is true option elements whose selectedness is true Although browser support is very limited. Edited July 27, 2019 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now