i'm finding a way to check if an HTML tag is empty (contains no text). first of all, i'm thinking about checking if the tag can contain text (which has closing tag).
it turns out:
<img>
, <img/>
, <br>
, <br/>
, <input>
would return false
<div></div>
, <p></p>
would return true
please help, thanks in advance.