link

This is used to insert a link to another conceptual topic using its ID value. It can also be used to create links to elements within the same page that have an address attribute such as the introduction and section elements.

Usage

For topic links, a link consists of a required xlink:href attribute that contains the GUID of the topic to which the link will go and optional inner text. If no inner text is specified, the text will be retrieved from the referenced topic's companion file. If the companion file contains a linkText element, its value will be used. If not, the value of the title element will be used.

You can link to anchors within the target topic by adding a hash character (#) followed by the anchor name after the topic's GUID. For in-page links, simply specify a hash character (#) followed by the name of the anchor from an element's address attribute. Inner text is required for in-page links.

  Tip

When used in a relatedTopics element, an optional topicType_id attribute can be added that specifies a GUID value used to classify the link type so that it is grouped with other similar links. See the relatedTopics topic for more information.

Example

 
Self-closing: <link xlink:href="cfd9dabf-22f3-4742-8b54-d84404610db1" />

With inner text: <link xlink:href="cfd9dabf-22f3-4742-8b54-d84404610db1">
companion file</link>

In-page link to introduction: <link xlink:href="#intro">Back to Intro</link>

Link to other topic anchor:
<link xlink:href="dc4fcc96-283e-4202-9ecc-08a65e0c9313#BuildTools" />

Example Output

Self-closing: Companion File

With inner text: companion file

In-page link to introduction: Back to Intro

Link to other topic anchor: Links to Resources

See Also