11. Which of the following selector selects an element that has no children? A. :empty B. :nochild C. :inheritance D. :no-child Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
12. Which of the following selector selects the elements that are currently enabled? A. :element B. :empty C. :enabled D. none of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Example: input:enabled {background-color:white;}
13. 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 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Example: strong:first-of-type {font-size:bigger;}
14. 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 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Example: *:not(h1) {color: black;}
15. 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 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Example: h1:only-child {color: blue;}
16. Which of the following selector selects the element that is the target of a referring URI? A. :target B. :selection C. ::selection D. :URI Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Example: :target{color:red;}
17. 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 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Example: :valid {color: green;}
18. p {line-height: 150%;}.What type of selector is used in this case? A. class Selectors B. element Selectors C. id Selectors D. none of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: These selectors are called element selectors and are simply used as follows: element-name { /* properties */ }
19. By applying an ___________ a style can be applied to just a single tag. A. class rule B. element rule C. id rule D. none of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: By applying an id rule, a style can be applied to just a single tag. For example, if we name a tag with a unique id attribute as follows <tag id="id-value">Affected Text</tag>
20. The _____________ attribute is used to define the name(s) of the class(es) to which a particular tag belongs. A. class B. element C. id D. none of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board