associate js with html to define the variable code example Example: js variable html <div onload="document.innerHTML(name + ' is ' + age)">