Sooner or later you will want to create a link between some text and either another page on your website, or to another website, perhaps to a club which you are invloved in. A link is made using the A (link) tag and the href attribute. A link need not only point to another HTML web page, some of the possibilities are: an image; a sound file; a text document.
A link tag looks like:
<A href="www.mywebsite.com/events.html">Events</A>
As can be seen it is a two part tag, wrapping the item which is to be used as the reference. The attribute href is used to define the link, in this case to the website mywebsite.com and the page events.html.
The target attribute may be used to define what happens when the link is clicked.
target="_blank" will open a new browser window, leaving the orignal page open.
target"_self" will open the link in the current browser window.
It is also possible to link to an Anchor point within a web page. To do this we need to first create an anchor point <A name="january"> then we need to modify our previous example:
<A href="www.mywebsite.com/events.html#january">Events - January</A>
This will now link to the January events on the events page.
NAT October 2005 (Revised)
|
This article viewed: 1171 times |
Back |
Copyright © 2004-2007 Janet Systems Ltd.