Can external links be configured to open in new windows or tabs in DITA outputs?
Controlling whether external links open in new windows or tabs in DITA outputs can enhance the user experience and provide more flexibility. This behavior can be configured using target attributes in DITA. Here’s how you can specify whether a link should open in a new window or tab:
Open in the Same Window: If you want the link to open in the same window, you don’t need to specify any additional attributes. This is the default behavior for links in DITA.
Open in a New Window or Tab: If you want the link to open in a new window or tab, you can use the show
attribute with the value new
. Here’s an example:
<link href="https://example.com" show="new">Visit Example</link>
By setting the show
attribute to new
, you indicate that the link should open in a new browser window or tab when clicked. This provides users with the option to keep the current content open while viewing the linked resource.