I am wondering if it is possible to remove a tag but leave the content in tact? For example, is it possible to remove the SPAN tag but leave SPAN\'s content there?
If it’s the only child span inside the parent, you could do something like this:
HTML:
The weather is sure sunny today;
The weather is sure sunny today
JavaScript:
parent = document.querySelector('.parent'); parent.innerHTML = parent.innerText;
So just replace the HTML of the element with its text.