I want to override the css of <h1>
and <h2>
using selector (specific using selector only) but it's not working. It's getting only applied to one class only <h1>
color changes to green not <h2>
.
Please help can someone tell me where I am wrong. Please help!
.temp {
color: blue;
}
.temp2 {
color: red;
}
p .temp,.temp2{
color: green !important;
}
<p>
hi there this is a test page
<h1 class="temp">heading inside p tag</h1>
<h2 class="temp2">2nd heading inside p tag</h2>
</p>