4
4
< title > page title</ title >
5
5
</ head >
6
6
< body >
7
- < h1 class =":first-child :last-of-type :only-of-type "> header</ h1 >
7
+ < h1 class =":first-child :first-of-type : last-of-type :only-of-type "> header</ h1 >
8
8
< form action ="# " class =":first-of-type :last-of-type :only-of-type ">
9
- < input type ="text " placeholder ="Name " disabled ="" class =":disabled :empty :first-child :optional :read-write ">
9
+ < input type ="text " placeholder ="Name " disabled ="" class =":disabled :empty :first-child :first-of-type : optional :read-write ">
10
10
< input type ="text " placeholder ="Address " readonly ="" class =":empty :enabled :optional :read-only ">
11
11
< input class ="zipcode :disabled :empty :read-write :required " type ="text " placeholder ="Zip Code " disabled ="" required ="">
12
12
13
13
< input class ="submit :empty :enabled :last-of-type :optional :read-only " type ="submit " name ="" value ="submit " readonly ="readonly ">
14
14
15
15
< select readonly ="" class =":enabled :first-of-type :last-of-type :only-of-type :optional :read-only ">
16
- < option class ="first-child "> option 1</ option >
17
- < option > option 2</ option >
18
- < option > option 3</ option >
16
+ < option class =":enabled : first-child :first-of-type "> option 1</ option >
17
+ < option class =" :enabled " > option 2</ option >
18
+ < option class =" :enabled :last-child :last-of-type " > option 3</ option >
19
19
</ select >
20
20
21
21
< textarea class =":empty :enabled :first-of-type :last-of-type :only-of-type :optional :read-write "> </ textarea >
22
22
23
- < button type ="button " class =":enabled :first-of-type :last-child :last-of-type :only-of-type "> Button</ button >
23
+ < button type ="button " class =":enabled :first-of-type :last-child :last-of-type :only-of-type :optional "> Button</ button >
24
24
</ form >
25
25
26
26
< div class =":first-of-type ">
27
27
outer
28
- < div class =":first-child :last-child :last-of-type :only-child "> Inner</ div >
28
+ < div class =":first-child :first-of-type : last-child :last-of-type :only-child :only-of-type "> Inner</ div >
29
29
</ div >
30
30
31
31
< div class =":empty :last-of-type "> </ div >
32
32
33
- < button type ="button " disabled ="" class =":disabled :first-of-type :last-of-type "> Button 2</ button >
33
+ < button type ="button " disabled ="" class =":disabled :first-of-type :last-of-type :only-of-type :optional "> Button 2</ button >
34
34
35
- < ul class =":first-of-type :last-of-type ">
35
+ < ul class =":first-of-type :last-of-type :only-of-type ">
36
36
< li class =":first-child :first-of-type "> list 1</ li >
37
37
< li >
38
38
list 2
39
- < ul class =":first-child :first-of-type :last-child :last-of-type :only-child ">
40
- < li class =":first-child "> l2 - 1</ li >
39
+ < ul class =":first-child :first-of-type :last-child :last-of-type :only-child :only-of-type ">
40
+ < li class =":first-child :first-of-type "> l2 - 1</ li >
41
41
< li > l2 - 2</ li >
42
42
< li class ="hr :empty :last-child :last-of-type "> </ li >
43
43
</ ul >
44
44
</ li >
45
45
< li class =":last-child :last-of-type ">
46
- < p class =":first-child :first-of-type :last-child :last-of-type :only-child ">
47
- The number of lines in a paragraph depends on the size of the browser window. If you resize < a href ="#test " class =":first-child :last-child :last-of-type "> the browser</ a > window, the number of lines in this paragraph will change.
46
+ < p class =":first-child :first-of-type :last-child :last-of-type :only-child :only-of-type ">
47
+ The number of lines in a paragraph depends on the size of the browser window. If you resize < a href ="#test " class =":enabled : first-child :first-of-type : last-child :last-of-type :only-child :only -of-type "> the browser</ a > window, the number of lines in this paragraph will change.
48
48
</ p >
49
49
</ li >
50
50
</ ul >
@@ -55,7 +55,7 @@ <h1 class=":first-child :last-of-type :only-of-type">header</h1>
55
55
in the source code,
56
56
but the browser
57
57
ignores it.
58
- < a class =":first-child :first-of-type :last-child :last-of-type "> no href</ a > and < a href =""> empty href</ a >
58
+ < a class =":first-child :first-of-type "> no href</ a > and < a href ="" class =" :enabled :last-child :last-of-type "> empty href</ a >
59
59
</ p >
60
60
61
61
< p >
0 commit comments