A webpage is a format of document, and a url is the correct means of publishing it.
Of course, webpages can be dynamic; that is, produced by code. Code is data, but the distinction is of first importance when managing upgrades. It is therefore convenient to define data, as data that is not code; unless stated otherwise.
When the distinction is blurred, we call the data a script. A document with a script is a project within itself: we in fact should attempt to perfect our scripts, for, if they are certainly script, we will ever be copying them from project to project.
Dynamic webpages, then, are pages that are generated by code on the server; this gives us a key to understanding what it is that we are staring at.
And it is simple: XML is an OCD version of SGML. Let me elaborate: SGML allowed one to see tags as on/off codes, so that the order in which one closed them was not important; XML instilled the idea that the document is a tree. Now that this is obvious to everyone, some give themselves the liberty to bash the work the XML consortium did.
In my opinion the inflexibility <in XML> of attribute quotes is excessive (<love from=*/&guitar;/>); otherwise, essentially, what we are using is XML without a document type definition.