Javascript DOM Element InnerHTML
<html> <head> <title>getElementById() + innerHTML Example</title> </head>//from w w w. j av a 2 s . c om <body> <div id="helloWorldDiv"></div> <script> let myDivRef = document.getElementById("helloWorldDiv"); myDivRef.innerHTML = "<h1>Hello World!</h1>"; </script> </body> </html>