Jump to content

issue in Css :checked selector


Akhil Gupta

Recommended Posts

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

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 by dsonesuk
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...