how to use a javascript variable in html code example Example: js variable html <div onload="document.innerHTML(name + ' is ' + age)">