You select the Hierarchical Menus Asset, create a menu, drag it to your document, and a script is automatically inserted in your document HEAD , as well as a link that actually launches the menu. Deciding you've changed your mind, you delete the link, but the script is still there, invisible to you. Assets allow you to insert objects into your documents easily. Validation and Checking HoTMetaL is built around a complete and compliant SGML system. This a Good Thing.
All documents have a DTD, and can be validated against it at any time.
All view modes except HTML Source mode make sure that your document remains valid while you're editing as well, so it's really hard to create invalid documents using HoTMetaL. If you do, or if you load an invalid document, HoTMetaL is pretty good at helping you correct your mistakes in a consistent manner. HoTMetaL will warn you about proprietary HTML extensions. Of course, being valid is a relative thing. The default DTD used to validate HTML documents is not an official one from the W3C or ISO, but SoftQuad's own DTD which contains many non-standard proprietary Microsoft and Netscape extensions. You can select a DTD when you create a document, but not easily change it after that.