How to add links

The heart of the Internet is the fact you can link a page of contents to another, to help your reader continue learning or take another action.

To add a link to your web page, you need to think about this first:

+ Will your link take your reader to another page within your site?
+ Will it take him to another website?
+ Or will it take it to another part of this same document?

How to add a link to another page within your site

The tag used for links is <a></a> on the mark up. Include this tag, specifying the file you want to link to. Thus, to link from a.htm to b.htm, you will use:

<a href="b.htm">Click here to continue</a>

That's it. When a browser reads this instruction, it will render a link. Try it out.

How to add a link to a web page on another website

To include a link to a web page that is on another website, include the complete URL of the file you want to link to, including the http:// prefix. Else, it won't work. Thus, to link to the version in Spanish of this same web page, you will have to do this:

<a href="http://www.heptagrama.com/sp/i_ref_pcs_0015.htm">Click here to continue</a>

Try it out.

How to add a link to another part of this same document

You can also include a link to another section of the document you are working on. To do this, you need to specify an anchor name with this tag <a name=""></a> and the link as you learnt above. Thus, to link to a given subheading of your document, you will have to do this:

Step one:

Include the anchor tag next to the subheading you want to link to:

<a name="subheading"></a><h2>Subheading</h2>

Step two:

Link to that subheading, including the hash symbol (#), to indicate your link goes to somewhere within this same document:

<a href="#subheading">Click here to go to the subheading</a>

That's all you need to learn about links... but that's not a complete web page yet.

+ Click here to continue.


Creative Commons Heptagrama, the web summed up.
Some rights reserved.

Discover and learn + Computers and the Internet

Do not click.
Enviar / Send