After deciding to take my app in a new direction, I cleaned out the database and made a new page. One of the data fields I deleted contained a bunch of javascript.
Now, when I go to Preview my new page, that old javascript appears, in text form, like some kind of restless spirit – above the header and body of my page.
Here’s the new page in the editor: almost nothing on it.
Head slap - solved. Thanks for your quick responses!
I had checked each individual element for html and SEO tags and found nothing. What I didn’t do is look at the SEO/Metatags tab under settings – sure enough, that code had somehow been pasted into the ‘Script/Metatags in Header’ field.