CSS pseudo class :active

The :active pseudo-class applies while an element is being activated (e.g. clicked) by the user. For example, between the times the user presses the mouse button and releases it.

Example – css :active

This example reduces font-size to 0.9em when a link gets clicked. Note that click does not reload the page as we are adding hash fragment in url.

<style type="text/css">
a:active {
  font-size: 0.9em;

<a href="#target1">Click me</a><br/>



Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments