JSFiddle - React, Tailwind, and code Playground

HTML

<a href="some_image.jpg">
 <noscript>
     <img src="some_image.jpg"/>
     <p>paragraph</p>
 </noscript>
</a>

JavaScript

$('noscript').replaceWith(function(){
    return this.textContent || this.innerText;
});