how to use innertext substring dom html code example Example: change innertext javascript element.innerText = "Hello World";