how to change inner text of html element using js code example Example: change innertext javascript element.innerText = "Hello World";