Inserting Text Hyperlinks

A text hyperlink is one of the most basic forms of a navigation link. It is simply a hyperlink applied to text. When an end user clicks the hyperlink in the output, the location specified in the hyperlink opens.

How to Insert a Text Hyperlink

  1. Open the document or topic.
  2. Highlight the text that you want to use as the link (or "hotspot").
  3. Do one of the following, depending on the part of the user interface you are using:

    • Ribbon Select Insert > Hyperlink.

    • Keyboard Shortcut Press CTRL+K.

    • Local Toolbar In the local toolbar of the XML Editor, click .

    The Insert Hyperlink dialog opens.

  4. From the Link to drop-down field, select a way to identify the topic, bookmark, or file to which you want to link. Based the option you choose, the section below gives you a list of selections or additional fields to complete.

    Place in This Document

    This option displays any bookmarks, headings, and other elements in the current file. Expand the appropriate section and select the element to which you want to link. If you select anything other than an existing bookmark, Contributor will insert a new bookmark at that destination in the file.

    External File 

    This option lets you search for a file (e.g., HTM, HTML, XML, PDF, Microsoft Office files) outside your file. After you select this option, enter the path to the file in the field next to the External File button.

    You can also click to display and select any bookmarks within the destination file, or if you have selected a PDF file.

    Note Because the link usually needs to be relative, based on the final locations of your output files, it is preferable to enter the text directly into the field, rather than clicking the External File button.

    Website

    This option lets you enter the path to an external file, such as the URL for a website. After you click this option, simply type the path in the field next to the Website field (e.g., http://www.acme.com).

    If you want to insert a variable in a field, you can click Add a variable definition.. The variable will appear as syntax in the field, but in the output the variable definition will be shown.

    Email 

    This option lets you add email addresses and subject line so that the user can quickly send an email. To add multiple email addresses, separate them with semi-colons.

    Example You might use this feature to help the end user send an email to your company's technical support department. When users click the link, it opens their email program and begins a new email message for them, inserting the email address and subject line for them. After you click this option, complete the E-mail address and Subject fields to the right (or select a recent email address from the list below).

  5. (Optional) The Link text field displays the text that you highlighted in the topic, which will be used as the hyperlink. Leave the text as it is, unless you decide you would like to change it. If you want to change the link text, type the new text in the field. It will replace the previously selected text in the topic.
  6. (Optional) In the Screen Tip field you can type a phrase that will appear when the end user hovers over the hyperlink in the output.

    When you enter a screen tip, it is added as a <title> tag in the markup. In addition, an <alt> (alternate text) tag is added with the same text. This is useful when it comes to accessibility.

  7. (Optional) In the Alternate Text field, type a phrase that describes what the element is about. This option should be used to increase accessibility for users who are unable to view an element. See Alt Text and Title Attributes.
  8. (Optional) Next to the Style Class field click the Select button. This opens the Select Class dialog, which lets you apply one of the defined hyperlink styles from your stylesheet to the link. You can change the appearance of the link in the Stylesheet Editor. After you select a style class in the dialog, click OK. The Style Class field displays the selected style. (If you do not specify a style class, Contributor uses the parent "a" style.)
  9. (Optional) In the Target Frame field, click the drop-down arrow to select the way the linked destination will open (e.g., in another window, in a popup).
    • Page Default The destination file opens in the same window as the output window.
    • Parent Frame The destination file opens in the parent frame of the current topic while hiding that topic.
    • New Window The destination file opens in a new browser window.
    • Same Frame The destination file opens in the same window frame as the current topic.
    • Top Frame The destination file opens in the same output window, removing all other framesets. You might use this option, for example, if the destination topic has its own frameset.
    • Popup Window The destination file opens in a popup box on top of the current topic.
  10. (Optional) In the Tab Index field you can enter a value to specify the order in which users can tab through hyperlinks in a document. So when a user presses the TAB key the first time in a document, the hyperlink with an index value of 1 will be selected first, the hyperlink with a value of 2 will be selected next, and so on. If you want to skip a hyperlink, enter -1 in that field.
  11. Click OK. The hyperlink is added to the topic.
  12. Click Save the active file. to save your work.

Note This feature is not supported for MadCap Lingo review package (LIREV) files.