-1

For eg. I don't want that the CSS property should not be applied on the h4 tag

.abc {
  color: red;
}
<div class="abc">
<h4>Hello 1</h4>
<p>Hello 2</p>
<p>Hello 3</p>
</div>

1 Answers1

0

Try the :not pseudo-class

.abc :not(h4) {
  color: red;
}
<div class="abc">
<h4>Hello 1</h4>
<p>Hello 2</p>
<p>Hello 3</p>
</div>
mplungjan
  • 169,008
  • 28
  • 173
  • 236