I was in a Web Development Class in my University Computer Science Department and the teacher asked the class: "Why a class selector rule was getting applied over a tag selector rule (see example code)?". I answered that it was because of the CSS specificity and I was told I was wrong. The answer he wanted was because of the CSS inheritance.
While it is true, why is the CSS specificity an incorrect answer?
p {
color: red;
}
.section {
color: green;
}
<p class="section">Section</p>