HTML HYPERLINKS



Topics covered:

  1. Different types of Navigation Structures
  2. The anatomy of a hyperlink link.
  3. When and how to use absolute and relative addressing.
  4. How to use named anchors for targeting specific places on a page.
  5. 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.


    Linear navigation structure

  • Augmented Linear Structure: A linear structure plus, in each page, a link to the first page.


    Linear augmented navigation structure

  • Hierarchical Structure: Stats with a general topic with links to more specific topics.


    Hierarchical navigation structure

  • Combined Structure: Combines hierarchical and linear links.


    Combined navigation structure

  • Incoherent Structure: avoid this one.


    Incoherent navigation structure

 

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 ---| <a href="http://www.clarkson.edu/~bjukic/index.html" target="_blank"> My Home Page</a> |-- label --|- closing tag -|

Absolute and Relative Addressing.

  • Use absolute address for linking to the Web pages outside of your site. <a href="http://www.site.org/directory/some_page.htm">Page From Another Site</a>

  • 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: <a href="my_page.htm">My Page</a>

    • 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: <img src="sub_folder/mypage.htm">
    • 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.htm
      
      Then in mail_order_one.htm the relative addresses to the two other pages should be: <a href="../../orders/order_template.htm">Order Template</a> <a href="../../orders/mail/mail_order.htm">Order Template</a>


Using named anchors for navigating to a specific place on a page.



Create links using other than http protocols.

FTP

<a href=ftp://ftp.site.com/path/">FTP Site</a>

News

<a href="news:rec.pats.cats">Cats News</a>

Mailto

<a href="mailto:bjukic@clarkson.edu>Mail Me</a>