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.


Let's try the following example which links to :

<p>Click the following link</p>
<a href="" 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:


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.


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="" target="_blank">Opens in New</a> |
<a href="" target="_self">Opens in Self</a> |
<a href="" target="_parent">Opens in Parent</a> |
<a href="" 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="">Download The PDF File</a>