1form :active {
2 color: red;
3}
4
5form button:active {
6 background: black;
7}
1<!DOCTYPE html>
2<html>
3<head>
4<style>
5a:active {
6 background-color: yellow;
7}
8</style>
9</head>
10<body>
11
12<a href="https://www.w3schools.com">w3schools.com</a>
13<a href="http://www.wikipedia.org">wikipedia.org</a>
14
15<p><b>Note:</b> The :active selector styles the active link.</p>
16
17</body>
18</html>
19