Links
Links provide ways of moving rapidly through WWW documents in a non-linear fashion. There are two kinds of links
- External
External links lead your audience away from the WWW document they are currently viewing. External links are either links to WWW documents produced by other people or links to specific points in other WWW documents produced by you.
Click here for more information about external links. - Internal
Internal links lead your audience to specific points within the WWW document they are currently viewing.
Click here for more information about internal links.
Whether internal or external, a link is usually portrayed as text (either one or more words), although you can also define images as links.
Click here for more information about using images as links.
Links are usually displayed as blue text and underlined by a browser, as you see on this page, but you can turn off this underlining and customize your link colors as you wish.
Click here for more information about customizing your links.
You can use the tags illustrated below to create and customize the links your WWW documents.
| Link-Related Attributes: How They Work | |
|---|---|
|
FORMAT For both external and internal links, use the <a href> start and </a> end tags to surround the "address" of each link. All text contained between these tags will be displayed as the link. Be sure and use the </a> tag to end the link. Note that the link address (adddress.html) should be enclosed in quote marks as indicated below. | |
|
<a href="address.html">This Is Your Link</a>
Appearance in your WWW document:
| |
|
INTERNAL LINKS You can define links to specific points in either your current WWW document or another WWW document you have created as part of your website. These are called Internal Links or "jump links" and they provide a great way for users of your WWW documents to navigate from idea to idea. Internal links, whether to specific points in your current WWW document or to another WWW document you have created as part of your website, are created in two steps.
Step 1: Create the Link Anchor in the target document To create the link anchor in the target document use this tag format <a name="link"> * * * </a> to surround at least one word at the precise point in the target document to which you want to jump. "Link" can be any word you wish. The link name should be enclosed in quote marks as shown here, and below. | |
|
<a name="example">example of where an internal link might end</a>
Appearance in your WWW document:
| |
|
Note that there is no outward appearance in the target WWW document that it contains this anchor, no underlining or special coloring of text. The anchor for this internal jump link is invisible.
Step 2: Create the Link Origin in the document where the link begins To create the link origin, use the <a href> start and </a> end tags to surround the word(s) where you want the internal link to begin. Inside the <a href> start tag, place the address of the WWW document where you want the internal link to end, followed by the pound symbol (#) and the name of the link anchor you have already created. Be sure to use the same name as you did for the link anchor in the target WWW document or your link will not work. If you are linking to a specific point within the current WWW document use this format for your link origin address: <href="#example"> Note that with this format you are providing the name of the specific point within the current WWW document to which you wish to link. The link address should be enclosed in quote marks as shown here, and below. | |
|
<a href="newpage.html#example">This is a link to a specific point in this WWW document</a>
Appearance in your WWW document:
| |
|
If you are linking to a specific point in another of your own WWW documents which resides on the same directory (file) as the one you are linking from, use this format for you link origin address:
<href="newpage.html#example"> Note that with this format you are providing the name of the specific WWW document and the specific point within that document to which you wish to link. The link address should be enclosed in quote marks as shown here, and below. | |
|
<a href="newpage.html#example">This is a link to a point in another WWW document</a>
Appearance in your WWW document:
| |
|
EXTERNAL LINKS You can define links to WWW documents produced by other people. These are called External Links because they lead outside your own WWW document. Place the address of the end location of your link inside the <a href> start and </a> end tags, like this: <a href="www.address.html"> * * * </a>. The "http://www." at the beginning of the link address is necessary to signal the browser to connect to a different WWW document outside the current directory (file). Note that the entire link address should be enclosed in quote marks as shown here, and below. All text contained between the <a href> start and </a> end tags will be displayed as the link. Be sure and use the </a> tag to end the link. | |
|
<a href="www.newpage.html">External Link To Another WWW Document</a>
Appearance in your WWW document:
| |
|
CUSTOMIZING YOUR LINKS The links in your WWW document are "static" (link), "active" (alink), or "visited" (vlink) depending on whether they have been selected. You can define the color of each of these three states of your links. Learn more in the "Color" section of this guide. | |
|
IMAGE LINKS Images, just like text, can be defined as links. This means a user of your WWW document can click on an image and be taken somewhere else, in the current WWW document or another within your website, or to an external WWW document, and provided with further information, just as if they clicked on a textual link. The formatting for creating an image link is shown below. Note: The address of the WWW document at the end of the link, the image's attributes (width and height), and the image's name (typewriter.gif) should all be enclosed in quote marks as indicated below. | |
|
<a href="www.newpage.html"><img width="46" height="35" src="typewriter.gif"></a>
Appearance in your WWW document:
|