We can use the CSS pseudo-class property :checked on input type radio & checkbox and the adjacent sibling combinator (E + F) E is the first element which is input type radio or checkboxes and F is the next element which is label. CSS   /* E + F */
/* Selected radio input & label */
input[type=radio]:checked+label{
/* Your styles here */
}
/* Checked checkbox input & label */
input[type=checkbox]:checked+label {
/* Your styles here */
} This is a frequently asked CSS interview question.