Thanks. I guess I should back up and explain better, my apologies.
I was given the code via this link: https://www.hostmamas.com/domain.html
As you can see, if you put a domain in the box (wordpress.com for instance) it will take you to the site that offers various other domains available to register. So that code is working properly.
I viewed the source and copied/pasted the code into my WordPress page Text box and it no longer works.