HTML and CSS Reference
Figure 6-4. The :hover selector allows a style to be applied only when the mouse cursor is over
The :active selector is for styling an element that is being activated by the user,
which, for instance, means the mouse button has been pressed over the element, but it is
yet to be released. This selector could be used anywhere the appearance of an element
should change when the element is pressed but prior to releasing the element, such as
in a drag-and-drop application. It is commonly used on link anchors to flash a different
color or other style change when a link is clicked.
Selecting form control elements
Table 6-8 lists a group of selectors used for styling the various states of user interface
components, notably, web form controls. Excluding the first four selectors, the selectors
from :indeterminate onward are part of the CSS3 Basic User Interface Module
(the other selectors shown in this chapter are part of the Selectors Level 3 Module).
Note The WC3's CSS working group published a document on August 12, 2011, that
indicates the next iteration of CSS will have all the selectors in this chapter specified in
the same module, named Selectors Level 4.