/* <span> https://example.com </span> */ const span = document.querySelector('span') span.innerHTML = `<a href='${span.textContent}'>${span.textContent}</a>`