Intermediate HTML & CSS
Q44 / 100

What does CSS specificity determine, and which of these has the highest specificity: an inline style, an ID selector, or a class selector?

Correct! Well done.

Incorrect.

The correct answer is B) Specificity determines which CSS rule applies when multiple rules target the same element; inline styles generally have higher specificity than ID selectors, which in turn outrank class selectors

B

Correct Answer

Specificity determines which CSS rule applies when multiple rules target the same element; inline styles generally have higher specificity than ID selectors, which in turn outrank class selectors

Explanation

CSS specificity ranks rules: inline styles > ID selectors > class/attribute/pseudo-class selectors > element selectors, determining which conflicting declaration wins (ignoring !important).

Progress
44/100