I want to load a custom html fetched from backend and load it into a page/iframe asynchronously. However when I load HTML with table elements, the content inside table element is moving outside of it.
let html = `
<div>
<table>
<tr>
<ul>
<li>Apple </li>
<li>Banana </li>
<li>Cat </li>
</ul>
</tr>
</table>
</div>
`
let s = document.createElement('html')
s.innerHTML = html;
console.log('Actual HTML', html);
console.log('Rendered HTML', s.innerHTML);