State
|
Description
|
Link
|
A
link that has not been visited.
|
Visited
|
A
link that has been visited.
|
Hover
|
A
link with the mouse pointer hovering over it.
|
Active
|
A
link that is active. Normally, this is the period of time between the mouse
button being clicked and released.
|
Focus
|
A
link that has focus.
|
One method of controlling the link presentation is through CSS classes. For example, adding the two CSS classes below to the style sheet displays all links in black, except hovering over a link displays the link in red.
A
{
color : Black;
}
A:Hover
{
color : Red;
}
In HTML a link is represented by the anchor tag <a>. The global style associated with the HTML anchor tag applies to all states where an explicit style is not defined (in this case, Link, Visited, Active, and Focus).
Hint: A link may be in more than one state at a time (i.e. Visited and Hover). Therefore, the Hover state style should appear after the Linked and/or Visit state styles, and the Active state style should appear after the Hover state.
Many different style attributes can be used to provide feedback to the user. The most common style attributes are: color, background-color, text-decoration, and the font attributes.
No comments:
Post a Comment