how to add content from javascript to html code example
Example 1: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
Example 2: js add more text to element
document.getElementById("p").textContent += " This is the text from javascript.";
<p id ="p">This is the text from HTML.</p>