I’ve seen (on other web pages) that some web links replace the current page, while others open an entirely new tab (or browser instance).
The latter is especially handy for reference material existing outside of Anvil, as the Anvil app user then does not lose their place in the app, when the target page is opened.
How do we tell Anvil which kind of link we want to display?
By default, all URLs visited from Anvil Link components will open in a new tab. (We use precisely the target="_blank" mechanism described by @david.wylie above). Because Anvil apps are rich single-page applications, users almost never want to “replace” the app with a link to an external site. And links to internal pages are taken care of by handling the Link's click event.
That said, we may be persuaded to add a target property to Link components at some point if the need arises. Paying users can, of course, use custom HTML in the meantime if need be.
The demo’s good in that it does update the window url when the link is clicked (eg: https://monstrous-flawless-manatee.anvil.app/#ContentForm3) but the links don’t have their url attribute set, so one can’t just “Copy Link Address” from them, so maybe the only way to do that as suggested before would be to create a custom Link component via some custom HTML Form like so:
<a href="#ContentForm1" target="_self">CONTENT FORM 1</a>
Also this component then would need to “export” some properies like url, text, whatever for it to be customizable… right?
Or could one just subclass Link to achieve this somehow? Any other more pythonic way?