HTML HYPERLINKS
Topics covered:
- Different types of Navigation Structures
- The anatomy of a hyperlink link.
- When and how to use absolute and relative addressing.
- How to use named anchors for targeting specific places on a page.
- Using hyperlinks with other than http protocols.
Designing your web site: Navigation Structures (Link Maps).
Designing your web site in the form of a link map(s) helps you determine which navigation structure works best for the type of information you are presenting and the expected activity of your customers.
There are several types of navigation structures:
- Linear Structure: Each page is linked to the next and previous pages.
- Augmented Linear Structure: A linear structure plus, in each page, a link to the first page.
- Hierarchical Structure: Stats with a general topic with links to more specific topics.
- Combined Structure: Combines hierarchical and linear links.
- Incoherent Structure: avoid this one.
Hyperlink element: URL, target, image or/and label, and closing tag.
Anatomy of URL:
http://www.site.edu/directory/page.htm protocol----|-- domain --|------ path ------| Intrinsic targets are: _top, _parent, _self, and _blank. Most of them are used with frames. _blank target means "open the document in a new window".
Example: My Home Page
|----------------- URL -------------------- |--- target ---| My Home Page |-- label --|- closing tag -|
Absolute and Relative Addressing.
- Use absolute address for linking to the Web pages outside of your site.
Page From Another Site - Use relative address for linking to your site Web pages.
- If my_page.htm is in the current folder give only a filename for the address:
My Page - If my_page.htm is in a sub-folder of the current folder give the sub-path without "/". For example, if the current folder /current_folder contains /sub_folder/my_page.htm, the relative address should be:
- If my_page.htm is in a folder which is outside of the current folder, use two periods .. (meaning a parent folder) to navigate up to the folder that contains both the current and the target folder. For example, if I have the following folder hierarchy:
/my_website /xxx /mail_order mail_order_one.htm (current page) /orders order_template.htm /mail mail_order.htmThen in mail_order_one.htm the relative addresses to the two other pages should be:Order Template Order Template
Using named anchors for navigating to a specific place on a page.
- In the source code, create a named anchor at the place in the page you want to jump to:
- In the source code, create a hyperlink to the anchor at the place in the page you want to jump from:
[Label or Image] - Using a named anchor, you can jump to a certain place in another Web page :
[Label or Image] Example: Assignment 1, Assignment1:Assignment1 - A good practice is to have a link "To the Top", or "Back to Menu":
[Label or Image]
Create links using other than http protocols.
FTP
FTP Site News
Cats News Mailto