CodeZettaInterview Hub

CSS · Cascade · Mid-Level · Comparison

How does inheritance differ from the cascade?

Short Interview Answer

Inheritance passes computed values to children for inheritable properties; cascade resolves conflicts per element.

Detailed Explanation

Use inherit, initial, unset, revert intentionally. color inherits; margin does not.

Did you know this answer?