Test Series - css

Test Number 24/59

Q: Which of the following selector selects all elements of E that have the attribute attr that end with the given value?
A. E[attr^=value]
B. E[attr$=value]
C. E[attr*=value]
D. none of the mentioned
Solution: Example: p[title$="!"] {color: red;}
Q: Which of the following selector selects the elements that are checked?
A. E ~ F
B. ::after
C. :checked
D. none of the mentioned
Solution: Example: :checked {color: blue;}
Q: Which of the following selector selects the elements that are the default among a set of similar elements?
A. :default
B. :%
C. :disabled
D. none of the mentioned
Solution: Example: :default {background-color: red;}
Q: Which of the following selector selects an element that has no children?
A. :empty
B. :nochild
C. :inheritance
D. none of the mentioned
Solution: none
Q: Which of the following selector selects the elements that are currently enabled?
A. :element
B. :empty
C. :enabled
D. none of the mentioned
Solution: Example: input:enabled {background-color:white;}
Q: Which of the following selector selects the element that is the first child of its parent that is of its type?
A. :first-of-type
B. :last-child
C. ::first-line
D. ::first-letter
Solution: Example: strong:first-of-type {font-size:bigger;}
Q: Which of the following selector selects elements that do not match the selector s?
A. :!(s)
B. :nth-child(s)
C. :not(s)
D. none of the mentioned
Solution: Example: *:not(h1) {color: black;}
Q: Which of the following selector selects an element if it’s the only child of its parent?
A. :root
B. :nth-oftype(n)
C. :only-child
D. none of the mentioned
Solution: Example: h1:only-child {color: blue;}
Q: Which of the following selector selects the element that is the target of a referring URI?
A. :target
B. :selection
C. ::selection
D. :URI
Solution: Example: :target{color:red;}
Q: Which of the following selector applies styles to elements that are valid per HTML5 validations set either with the pattern or type
attributes?
A. :valid
B. :required
C. :optional
D. :invalid
Solution: Example: :valid {color: green;}

You Have Score    /10