Sets the style of the A element when the link is engaged or active.
Syntax
[a]:active { sRules }
Possible values
sRules
String that specifies one or more cascading style sheet (CSS) attribute/value pairs.
Remarks
The default value of the :active pseudo-class is browser-specific.
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 in conjunction 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 Cascading Style Sheets (CSS), Level 1 (CSS1).
Applies to
A