document.getElementById("demo").innerHTML is used for code example Example: Finding HTML Element by Id var myElement = document.getElementById("intro");