I am on the initial phases of Learning CSS
i had some doubts regarding css specificity. My html code has a span tag wrapped inside a div class extra. Both of these have been defined a different color in css . For some reason , the span tag takes effect and not the class extra
While learning about Specificity, i had read that a class ( extra here ) has a higher Specificity than element ( span here )
i even tried to calculate their Specificity on https://specificity.keegan.st , where class .extra had a Specificity of 10 being a class while span had a Specificity of 1 being a element
then is this not being followed in the actual output , i guess i am missing something .
Hope someone can clear this small doubt
<div class="extra">
<span>here is a span element</span>
</div>
span {
color: blue;
}
.extra {
color: green;
}