HTML and CSS Reference
sTyLinG Link sTaTes
Unlike standard text, links have five different states, depending on user interaction:
When the web page first opens, the link is in the default link state. In this state, brows-
ers typically underline the link text and color it blue. If the link contains an image, a blue
border surrounds the image.
After the user has clicked the link, the link is in the visited state. By default, visited
links are colored purple.
When the user's mouse is positioned over the link, the link is in the hover state. There
is no default color change for the hover state; however, the mouse cursor changes from an
arrow to a pointing hand, as shown in Figure 8-4.
Should the user be using the keyboard for navigation and has tabbed onto a link, the
link is in the focus state.
➤ When the user clicks the mouse, during the time the mouse button is down, the link is
in the active state. The typical default active state colors the link red.
Although you can set a style for the <a> tag by itself, any CSS properties are applied to just the
default state. It's better to create style rules for a:link , a:visited , and so on. These link states are
also known as pseudo-elements.