1<!DOCTYPE html>
2<html>
3<head>
4 <style>
5 /* On click: */
6 a:active {
7 background-color: yellow;
8 }
9 button:focus {
10 background-color: yellow;
11 }
12 /* On hover: */
13 h1:hover {
14 background-color: red;
15 }
16 p:hover {
17 background-color: red;
18 }
19 </style>
20</head>
21<body>
22 <a href="#">Click Me</a>
23 <button>Click me</button>
24
25 <h1>Hover over me</h1>
26 <p>Hover over me</p>
27</body>
28</html>