4

I need to select <b> tags but only if that is the only content inside of a <p>. So for example, select the b in <p><b>hello</b></p> but not in <p><b>hello</b> world</p>. Is this possible? :only-child doesn't do it.

1 Answers1

-1

You can simply find a common class for all tags you want to change and insert it inside the element (< b class="">). In the CSS you can then edit the class according to your wishes.

Eduard
  • 121
  • 7