Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

:active pseudo-class

Sets the style of an element when it is engaged or active.

CSS 2.1, Section 5.11.3

Syntax

selector :active {...}

Parameters

selector

A CSS simple selector

Standards information

Remarks

"Active" means that an element has been activated, and some action is being performed but is not yet complete.

The :active pseudo-class is most often used with the a element but it applies to all pseudo-elements.

Examples

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>

 

 

Show:
© 2014 Microsoft