1. Home
  2. Computer Science MCQs
  3. Cascading Style Sheets - CSS
  4. Which pseudo-class targets every second row?

Added 14 Sep 2025

Which pseudo-class targets every second row?

  1. :nth-child(2)
  2. :nth-child(even) Correct answer
  3. :nth-of-type(2)
  4. ::even

Correct answer

B. :nth-child(even)

13 views

MCQSEXAM

Explanation

:nth-child(even) selects even rows.

Reference

https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Cascading Style Sheets - CSS MCQs

Practise all Cascading Style Sheets - CSS MCQs

Similar MCQs