Specificity has to do with the nature of the selector . The cascade has to do with conflicts between multiple style sheets . Inheritance flows from higher to lower levels in the tree or outline of the document structure. Hence this paragraph has the same background color as its parent body. Inheritance fails deliberately when common sense informed the creators of CSS that it would be ugly, inconvenient, or otherwise undesirable for inheritance to apply.
Inheritance fails by mistake due to certain inconvenient bugs in browsers.
For example, Netscape version 4 fails to inherit most styles from body into tables. Specificity Specificity rules resolve conflicts between inheritance, classes, and IDs .This is done by adding up the specificity score for each style rule that could apply to a context. It should be used very carefully even when it does work, because of the accessibility problems it may cause some users. The cascade resolves conflicts between equally specific selectors. Stop if there's a winner.