How to add HTML text links

Linking Documents

A link is specified using HTML tag <a>. This tag is called anchor tag and anything between the opening <a> tag and the closing </a> tag becomes part of the link and a user can click that part to reach to the linked document. Following is the simple syntax to use <a> tag.

Example

Let's try the following example which links to http://www.regnsoft.com :

<p>Click the following link</p>
<a href="http://www.regnsoft.com" target="_blank">RegnSoft</a>

This will produce the following result where you can click on the link generated RegnSoft to go to the home page of RegnSoft.

Click the following link:

RegnSoft

The target Attribute

We have used target attribute in our previous example. This attribute is used to specify the location where the linked document is opened. The following are possible options:

_blank Opens the linked document in a new window or tab.
_self Opens the linked document in the same frame.
_parent Opens the linked document in the parent frame.
_top Opens the linked document in the full body of the window.
targetframe Opens the linked document in a named targetframe.

Example

Try the following example to understand basic difference in the few options given for target attribute. The code below will produce links where you can click on different links to understand the difference between various options given for target attribute.

<p>Click any of the following links</p>
<a href=" http://www.regnsoft.com" target="_blank">Opens in New</a> |
<a href=" http://www.regnsoft.com" target="_self">Opens in Self</a> |
<a href=" http://www.regnsoft.com" target="_parent">Opens in Parent</a> |
<a href=" http://www.regnsoft.com" target="_top">Opens in Body</a>

Download Links

You can create text link to make your PDF, DOC or ZIP files downloadable. This is very simple to do; you just need to give the complete URL of the downloadable file as follows:

<a href="http://www.regnsoft.com/file.pdf">Download The PDF File</a>