Seeking clarification on this specific CSS cascading/inheritance rule. In the given example, I would have expected the text inside the em tag to be colored #000000, but I was informed that it would actually be colored #ff0000.
I am familiar with CSS specificity rules for specified selectors, however, I have not previously considered the impact of styling on elements nested within other elements. Could you please direct me to where in the W3C spec this behavior is outlined? (or any other reliable source)
HTML:
<!DOCTYPE html>
<html>
<body>
<div>Hello, this is an <em>important</em> announcement.</div>
</body>
</html>
CSS:
* { color: #ff0000; }
div {color: #000000; }