Here is my brief HTML document.
Why is Chrome Console noting this error:
\"Uncaught TypeError: Cannot call method \'appendChild\' of nul
nul
document.body is not yet available when your code runs.
document.body
What you can do instead:
var docBody=document.getElementsByTagName("body")[0]; docBody.appendChild(mySpan);