<link>
A link is a reference to another DITA topic or a non-DITA resource.
Processing expectations
When displayed, links are typically sorted based on their attributes, which define the type or role of the link target in relation to the current topic.
Attributes
The following attributes are available on this element: link-relationship attributes, universal
attributes, @keyref
, @otherrole
, and @role
.
Example
The following code sample shows a simple collection of links in a
DITA topic. There are four links: two to DITA topics and two to to
HTML pages. The <linktext>
element provides
link text for the HTML pages, and the <desc>
element contain text that describes the resource that the link
targets.
<related-links>
<link href="covid-19.dita"/>
<link href="covid-19-testing.dita"/>
<link format="html" href="covid-19-nc.html">
<linktext>COVID-19 in North Carolina</linktext>
</link>
<link format="html" href="239fh49.html#resources">
<linktext>Public health resources in Durham, NC</linktext>
<desc>When you work as a contact tracer, you need to know ...</desc>
</link>
</related-links>