-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathnth-child.html
More file actions
40 lines (34 loc) · 984 Bytes
/
nth-child.html
File metadata and controls
40 lines (34 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>test page</title>
<style>
a.nothere:hover { font-weight: bold; }
a.actually:hover { font-weight: bold; }
a.nothere:active { font-weight: bold; }
a.actually:active { font-weight: bold; }
a.nothere:link { font-weight: bold; }
a.actually:link { font-weight: bold; }
a.nothere:focus { font-weight: bold; }
a.actually:focus { font-weight: bold; }
a.nothere:visited { font-weight: bold; }
a.actually:visited { font-weight: bold; }
div > :first-child { color: pink; }
div > :last-child { color: brown; }
div > :not(p) { color: blue; }
div > :nth-child(2) { color: red; }
</style>
</head>
<body>
<h1>h1</h1>
<a href="@" class="actually">actually</a>
<div>
<p>First one</p>
<p>Second one</p>
<p>Third one</p>
<span>Fourth one</span>
<p>Fifth one</p>
</div>
</body>
</html>