I need to find out the content before <img> tag in my HTML if it does not have <br/> before it. And if <img> jas some other content before it then I need to add <br/> before it.
I need to find out the content before <img> tag in my HTML if
Share
Consider this html code :- (This solution uses JQuery!)
Now in one case you need to get the element before
<img>Guess this would solve your problem.