CSS :active Selector

The :active pseudo selector changes the appearance of a link while it is being activated (being clicked on or otherwise activated). It's usually only seen for a split second, and provides visual feedback that the element was indeed clicked. It's most typically used on anchor links (<a href="#">).

The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user. When using a mouse, "activation" typically starts when the user presses down the primary mouse button and ends when it is released. The :active pseudo-class is commonly used on <a>and <button> elements, but may be used on other elements, too.

The :active selector is used to select and style the active link.A link becomes active when you click on it.

Syntax

:active

Example -