1.class {
2 /* Selects all elements with class = "class" */
3}
4
5#id {
6 /* Selects all elements with id = "class" */
7}
8
9p {
10 /* Selects all p elements */
11}
12
13p.class {
14 /* Selects all p elements with class = "class" */
15}
16
17h1, p {
18 /* Selects all h1 elements and p elements */
19}
20
21h1 p {
22 /* Selects all p elements inside h1 elements */
23}
24
25h1 > p {
26 /* Selects all p elements whose parent is a h1 element */
27}
28
29h1 + p {
30 /* Selects all p elements immediately after h1 elements */
31}
32
33h1 ~ p {
34 /* Selects every p element preceded by a h1 element */
35}
36