I have created a span element using:
ele= document.createElement(span);
ele.innerText = "bla bla (<a href='https://www.pepe.com'> ble ble </a>) blu blu";
divele.appendChild(ele); #divele is an div in the page
The problem is the tag is not showed as a link, it is showed literally.