I have this CSS:
h2 {
color: #000;
font-size: .9em;
}
#exp {
color: red;
font-size: .8em;
}
<div id="exp">
hello
<h1>hello</h1>
<h2>hello</h2>
<h3>hello</h3>
</div>
The result is this:
I understand the changing on the font-size. #exp
is more specific than h2
, but why didn't the color change?