# DITA Best Practices : Creating a link to an external file on the web

Created by Kelly Mankenberg on Oct 03, 2013

There may be times when you need to create a link from your online documentation to another document or file on our web server or the web in general. This is helpful if, for example, you need to refer to an archived PDF file.

To create a reference to a web file, use DITA's xref element.

1. Within oXygen, place the cursor where you wish the link to be.
   Note: an xref can be placed nearly anywhere in a DITA document.
2. From the menu bar, select DITA > Link > Web Link. The Input URL dialog is displayed.
3. In the URL field, type the URL to the desired file (ex. http://documentation.wolterskluwerfs.com/Help/IRAMC/PDF/IRAMC User Guide.pdf) and press OK.
   The link is inserted within the current DITA file.
   Notice in the above example that the URL is inserted within the xref element, but the actual text that the user will click is not inserted.
4. Enter the text the user is intended to click within the actual xref tags (highlighted above).

##### Tip

If the text to be clicked is already within the DITA document, you can simply highlight the text and then select DITA > Link > Web Link. This automatically surrounds the selected text with the xref tags.

## Attachments:

input url.png (image/png)
link inserted.png (image/png)
finished.png (image/png)