CSS UI pseudoclasses - Part 1

Notes:

CSS - Pseudo Class Selectors (User Interface):

1.
selector : enabled
{
declaration list;
}
It selects any html element targeted by the selector, if its status is enabled (default)

Ex:
input : enabled
{
background-color : yellow;
}
It selects any input element, if its status is enabled

2.
selector : disabled
{
declaration list;
}
It selects any html element targeted by the selector, if its status is disabled

Ex:
input : disabled
{
background-color : black;
}
It selects any input element, if its status is disabled

3.
selector : checked
{
declaration list;
}
It selects any html element targeted by the selector, if its status is checked

Ex:
input : checked + span
{
color : white;
background-color : red;
}
It selects any span element, if it is a sibling of and immediately preceded by input element which is in checked state

Interview Questions: