To insert HTML into a div with JavaScript, we can set the innerHTML
property.
For instance, we write
document.getElementById("tag-id").innerHTML = "<ol><li>html data</li></ol>";
to select the div with getElementById
.
Then we set its innerHTML
property to a string with the HTML we want to render.