nerdexam
CIW

1D0-720 · Question #54

What is a new selector introduced in CSS3?

The correct answer is C. nth-of-type Selector. nth-of-type is a structural pseudo-class selector introduced in CSS3, allowing you to target elements based on their position among siblings of the same type (e.g., p:nth-of-type(2) selects the second <p> element). Options A (ID selector, #id), B (Class selector, .class), and D…

Advanced CSS3 Styling and Layout

Question

What is a new selector introduced in CSS3?

Options

  • AID Selector
  • BClass Selector
  • Cnth-of-type Selector
  • DTag Selector

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    88% (21)

Explanation

nth-of-type is a structural pseudo-class selector introduced in CSS3, allowing you to target elements based on their position among siblings of the same type (e.g., p:nth-of-type(2) selects the second <p> element). Options A (ID selector, #id), B (Class selector, .class), and D (Tag selector, p, div, etc.) are all CSS1 selectors that existed long before CSS3 - they're foundational and were available in the earliest versions of CSS. CSS3's big contribution was a rich set of new pseudo-class and pseudo-element selectors, including nth-of-type, nth-child, :not(), and :last-child.

Memory tip: Think "3 for 3" - CSS3 brought structural selectors like nth-of-type. If a selector counts or positions elements, it's almost certainly a CSS3 addition.

Topics

#CSS3 Selectors#Pseudo-class#nth-of-type#Structural Selectors

Community Discussion

No community discussion yet for this question.

Full 1D0-720 Practice