CSS Inheritance, Precedence, and Specificity

This paragraph demonstrates inheritance. The text color is inherited from the body element.

This paragraph demonstrates precedence. The class selector overrides the element selector.

This heading demonstrates specificity. The ID selector has the highest specificity among the selectors used here.

This paragraph demonstrates specificity. The class selector has higher specificity than the element selector.

This paragraph demonstrates inline style. Inline styles have the highest specificity and override all other styles.