Easy Tutorial
❮ Css Pr Grid Pr Outline Style ❯

CSS :active Selector

Complete CSS Selector Reference

Example

Select the style for an active link:


Definition and Usage

The :active selector adds special styles to an active link.

A link becomes active when you click on it.

Tip: The :link selector sets the style for unvisited page links, the :visited selector sets the style for visited page links, and the :hover selector sets the style for links when the mouse is hovering over them.

Note: To achieve the expected effect, :active must be placed after :hover in the CSS definition!


Browser Support

The numbers in the table specify the first browser version that fully supports the selector.

Selector
:active 4.0 7.0 2.0 3.1 9.6

Note: The :active selector is supported by all elements in IE8 and newer browsers. For IE7, the :active selector only supports links.


Related Articles

CSS Tutorial: CSS Links

CSS Tutorial: CSS Pseudo-classes


More Examples

Example

Active, visited, unvisited, or when the mouse is hovering over the link:

Example

Different styles for links:


Complete CSS Selector Reference

❮ Css Pr Grid Pr Outline Style ❯