<link>: How do you create hyperlinks to other resources or locations within a DITA topic using the <link> element?

The <link> element in DITA allows you to create hyperlinks to other resources or locations within a DITA topic, enhancing the navigation and connectivity of your documentation.

Creating Hyperlinks

To create a hyperlink using the <link> element, you need to specify the target resource or location using the href attribute. Here’s an example:


For more information, visit our <link href="https://www.example.com" format="html" scope="external">website</link>.

In this example, we’ve created a hyperlink to an external website. The href attribute contains the URL of the target resource, and the format attribute indicates that it’s an HTML resource. The scope attribute specifies that it’s an external link.

Linking to Internal Topics

You can also use the <link> element to link to internal topics within your DITA documentation. Here’s an example:


For more details, refer to the <link href="#internal_topic">internal topic</link>.

In this case, we’ve linked to an internal topic within the same DITA document using the href attribute with a fragment identifier (#internal_topic). This creates a link to the specified topic within the document.