Sets the style of an a element when the link is engaged or active.
Syntax
HTML |
[A]:active { sRules } |
---|
Scripting | N/A |
---|
Possible Values
sRules | String that specifies one or more Cascading Style Sheets (CSS) attribute/value pairs. |
Remarks
The default value of the :active pseudo-class is browser-specific.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Active means that the user is navigating the link. The link has been activated, and some action is being performed but is not yet complete.
The :active pseudo-class is often used with :hover, :link, and :visited, the pseudo-classes that affect the other states of a link.
Example
The following style rule uses the :active pseudo-class to set the font-weight and color attributes of an active link in a document.
<STYLE>
A:active { font-weight:bold; color:purple }
</STYLE>
Standards Information
This pseudo-class is defined in
CSS, Level 1 (CSS1) .
Applies To