Links
There are several types of links used in DITA, which can each have different styling applied. Most use the <xref> element.
External Links <xref>
These are used to link to content outside your documentation set, such as a public website. External links use a cross-reference <xref> element with the scope="external" attribute.
When no link text is supplied, the full URL is inserted automatically. You can also specify custom link text.
Examples:
-
Go to https://google.com to search the internet.
-
Go to Google to search the internet.
Internal Links <xref>
These are used to link to another topic on the same platform or publishing environment and within the current DITA map. Peer links use use a cross-reference <xref> element with no attributes specified.
When no link text is supplied, the referenced topic's title is inserted automatically (best practice for keeping links updated). You can also specify custom link text.
Examples:
-
Learn more about tagging images at Figures.
-
Learn more about tagging images on the Figures Topic.
Peer Links <xref>
These are used to link to content on the same platform or publishing environment but outside the current DITA map. Peer links use use a cross-reference <xref> element with the scope="peer" attribute.
When no link text is supplied, the referenced topic's title is inserted automatically (best practice for keeping links updated). You can also specify custom link text.
Examples:
-
Go to our Video Tutorials page to view helpful videos on how to use the Heretto CCMS.
-
Go to our Videos page to view helpful videos on how to use the Heretto CCMS.
Link to Section in Same Document (Local Links) <xref>
Also called "jump links" or "local links," these are used to link directly to an element within the same DITA topic.
When no link text is supplied, the referenced topic's title is inserted automatically (best practice for keeping links updated). You can also specify custom link text.
Examples:
-
See External Links <xref> to learn more about linking to a URL outside the system.
-
See the External Links section to learn more about linking to a URL outside the system.
Link to Section in Another Document <xref>
These are used to link to a specific element in another topic on the same platform or publishing environment and within the current DITA map, allowing readers to jump directly to the relevant section instead of the beginning of the topic. These links use a fragment identifier to specify the desired element within the destination topic.
When no link text is supplied, the referenced element is inserted automatically (best practice for keeping links updated). You can also specify custom link text.
Examples:
-
Learn more about extended notes in [NO TITLE FOUND].
-
Learn more about extended notes in the Notes article.