<p id="intro" class="lead" style="color: purple">Hello</p>
#intro.lead { color: blue; }
p.lead { color: red; }
p { color: green !important; }
green
Green is right. An !important author declaration beats every normal author declaration. That includes the inline style, no matter the specificity. Author declarations are your own site's CSS.
Purple is the tempting wrong answer. Without the !important, the inline purple would win over #intro.lead, because inline styles beat selector rules.
Read more
- Cascade (MDN) (https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade)developer.mozilla.org