Sets the style of the anchor when the user hovers the mouse over the links.
Syntax
HTML [A]:hover { attribute1:parameter1 [; attribute2:parameter2 [; . . .]] } Scripting N/A
Possible Values
attribute Any attribute applicable to text. parameter Any of the range of values available to the corresponding attribute. The default value is browser-specific.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.
Remarks
Hover means that the user has the mouse positioned over the link and has hesitated. If the user simply passes the mouse over the link, the style does change. The hover pseudo-class is often used with specific styles for the other states of a link: active, link, and visited.
Using pseudo-classes on objects other than the A object has no effect.
The syntax in the following example uses a colon (:) to specify a pseudo-class.
Example
This example sets the style of an anchor. When the user hovers the mouse over a hyperlink to which the following style sheet has been applied, the text displays in red, converts to uppercase, and is spaced 1 centimeter apart.
Sample Code
<STYLE> A:hover { color:red; text-transform:uppercase; letter-spacing:1cm } </STYLE>
Applies To
A
See Also