Which of the following selector is used to selects the element that is the nth child of its parent?
A. :nth-child(n)
B. ::first-line
C. :last-of-type
D. :first-of-type
Answer: Option A
Solution(By Examveda Team)
div:nth-child(2) {background-color: red;}/* sets the background color to red if the div is its parent’s second child */
Related Questions on CSS3 Fundamentals
Which of the following css property specifies an image to use as the background of an element?
A. background
B. background-img
C. background-image
D. none of the mentioned
Which of the following css property specifies a delay for the transition effect?
A. transition-delay
B. transition-effect
C. transition
D. transition-duration
A. rotateY()
B. rotate-Y()
C. rotate-Yaxis()
D. none of the mentioned
Which of the following property defines where a 3D element is based in the x- and the y-axis?
A. transform-style
B. perspective(n)
C. perspective-origin
D. none of the mentioned
Join The Discussion