CSS Multiple Choice Questions & Answers on Specificity and Importance for Freshers

https://www.computersprofessor.com/2017/12/css-multiple-choice-questions-answers_14.html
Find the specificity of the statments using the rule given below.
A selector’s specificity is calculated as follows:
1)count 1 if the declaration is from is a ‘style’ attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, values of an element’s “style” attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.)
2)count the number of ID attributes in the selector (= b)
3)count the number of other attributes and pseudo-classes in the selector (= c)
4)count the number of element names and pseudo-elements in the selector (= d)
A selector’s specificity is calculated as follows:
1)count 1 if the declaration is from is a ‘style’ attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, values of an element’s “style” attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.)
2)count the number of ID attributes in the selector (= b)
3)count the number of other attributes and pseudo-classes in the selector (= c)
4)count the number of element names and pseudo-elements in the selector (= d)
1. Find the specificity of this “*”.
a) specificity = 0,0,0,0
b) specificity = 0,0,0,1
c) specificity = 0,0,1,0
d) specificity = 1,0,0,0
Answer: a
2. Find the specificity of this “li”.
a) specificity = 0,0,0,1
b) specificity = 0,0,1,1
c) specificity = 0,1,1,1
d) specificity = 1,1,1,1
Answer: a
3. Find the specificity of this ” ul li”.
a) specificity = 0,0,0,0
b) specificity = 0,0,1,2
c) specificity = 0,0,0,2
d) specificity = 2,0,0,0
Answer: c
4. Find the specificity of this “li:first-line”.
a) specificity = 0,0,1,1
b) specificity = 0,0,0,2
c) specificity = 0,1,0,1
d) specificity = 1,0,0,1
Answer: b
5. Find the specificity of this “ul ol+li”.
a) specificity = 0,0,2,1
b) specificity = 0,2,1,1
c) specificity = 0,1,1,1
d) specificity = 0,0,0,3
Answer: d
6. Find the specificity of this “ul ol li.red”.
a) specificity = 0,0,3,1
b) specificity = 0,0,1,3
c) specificity = 1,1,1,1
d) specificity = 1,2,2,1
Answer: b
7. Find the specificity of this “ul ol li.red”.
a) specificity = 0,0,1,3
b) specificity = 0,0,0,4
c) specificity = 0,1,2,1
d) specificity = 1,1,1,1
Answer: a
8. Find the specificity of this “li.red.leve”.
a) specificity = 2,0,0,1
b) specificity = 0,0,1,1
c) specificity = 0,2,0,1
d) specificity = 0,0,2,1
Answer: d
9. Find the specificity of this “#x34y”.
a) specificity = 0,0,0,1
b) specificity = 0,0,1,0
c) specificity = 0,1,0,0
d) specificity = 1,0,0,0
Answer: c
10. Find the specificity of this ” style=”” “.
a) specificity = 0,0,0,1
b) specificity = 0,0,1,0
c) specificity = 0,1,0,0
d) specificity = 1,0,0,0
Answer: d