how to style active link in css code example Example 1: link active css a:active { background-color: #34D399; } Example 2: css on click something:active {}