The scripting code shows up as text on my webpage instead of displaying a table. What did I do wrong?

Most likely you are using a CMS editor and you probably forgot to toggle the input to the HTML or SOURCE before adding the scripting.  To see how to do this in some popular CMS editors, check out the Not Sure How to Get to Your Editor's HTML Mode? and look for your webhost.