0

I want to remove or set css property as display:none for the text element which has no html element or has no id or class attribute. enter image description here Please check image for reference.

Murlidhar Fichadia
  • 2,589
  • 6
  • 43
  • 93

1 Answers1

1

You can try font-size: 0 trick.

div {
  font-size: 0;
}

div * {
  font-size: 1rem;
}
<div>
  <span>text 1</span>
  unwanted text
  <span>text 2</span>
</div>
doğukan
  • 23,073
  • 13
  • 57
  • 69