A link is defined by the element a, which specifies the target in the href attribute:
<a href="target">link text</a>
The content of the element defines the displayed link text. Following table lists the different types of link targets as well as the attributes that are supported for interactive and print output.
Defines a link to one of the following targets:
- A section or content node within the product-tree
- A file node within the product-tree
- An XHTML element with an id attribute assigned (e.g. figure, table or labeled block)
- A URL of an internet resource (e.g. a web page)
The details for each type of link are given in the following sub-sections.
Except for the internet URL, all targets have to be located within the product-tree. It is not possible to create a link to a section that is located in another product, because the alias names are only unique within the same product.
If not otherwise specified, the text within the opening <a
and closing </a>
tags is used as link text. However, it is possible to create links, where the link text is automatically replaced in the exported publication by a generated title. The generated title can, for example, include the title of the referenced element. See Section 3.4.5, “Link Text Replacement”
for details on how to control link text replacement.
Depending on the output format, the link may be displayed as an active link or as plain text. In case of an active link, if user clicks on the link, the viewer application jumps to the target location.