Question discussion

Which of the following CSS selectors has the highest specificity?

1358Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which of the following CSS selectors has the highest specificity?

  • Ap
  • B#nav p
  • Cp.menu
  • D.menu p
Correct answer: B

Explanation

Specificity is counted as (ids, classes, elements): p = (0,0,1); .menu p and p.menu = (0,1,1); #nav p = (1,0,1), the highest.

Discussion 0

Nobody has replied yet. Start the discussion!