New Graduate Student Seminar Series









The <A> Tag ... The Backbone of WebPages

<A HREF="filename"> </A>
This is the tag in HTML that creates a hyperlink to another Web page.
There are four general types of links distinguished by the location of the file you are linking to:

  1. Specifying a URL for a file in the same directory:
    <A HREF="filename.html">Text you want user to see</A>
    The previous code produces a link that appears as:    Text you want user to see

  2. Specifying a URL for a file in a subdirectory:
    <A HREF="subdir/filename.html">Text you want user to see</A>

  3. Specifying a URL elsewhere on the same server: (Note beginining slash)
    <A HREF="/activities/activities.html">Outdoor Activities</A>
    The previous code produces a link that appears as:    Outdoor Activities

  4. Specifying a URL for a file on another web server:
    <A HREF="http://www.santafe.edu/~malcolm/">Ian Malcom's Page</A> at The Santafe Institute
    The previous code produces a link that appears as:    Ian Malcom's Page at The Santafe Institute

Other uses of the <A> tag

  1. Creation of an email link:
    Please <A HREF="mailto:jarek@math.montana.edu">email me</A> with your math questions.

  2. The previous code produces a link that appears as:    Please email me with your math questions.

  3. The A HREF tag is also used to link to postscript and pdf files:
    PDF version of <A HREF="/~griff/m182/quiz/quiz7.pdf">M182 quiz 7</A>
    The previous code produces a link that appears as:   PDF version of M182 quiz 7
  4. The NAME attribute is used to specify links within a page.
    The links look like: <A HREF="#bottom">Bottom of the page</A>
    The previous code produces a link that appears as:    Bottom of the page
    The NAME anchor ( <A NAME="bottom"> ) must be set where you want the browser to land.
    OR another use: <A HREF="web_2.html">Return to Top of the page</A>
    The previous code produces a link that appears as:    Return to Top of the page
    Note, unlike other attributes, NAME is case-sensitive.
  5. The Target attribute is mostly annoying. but occasionally there is a use like:
    <A HREF="/help/images/isaac.jpg" TARGET="NewWindow">Isaac</A> at a recent conference
    The previous code produces a link that appears as:    Isaac at a recent conference



Server Side Includes

HTML uses the names <tag attribute="argument"> whereas SSI uses <!--#command argument="value"-->.
No spaces are allowed between the opening delimiter <!-- and the start of the command. Similarly, between the end of the command and -->, no spaces are allowed.
The result should look like this:
<!--#configfile="filename.htm"-->. Failure to follow this simple rule will result in the server seeing a <!-- comment --> instead of what you intended.

Example:
This is the time & date command: <!--#echo var="DATE_LOCAL"-->
Thursday, 16-Nov-00 16:23:38 MST

The following is a list of the various commands that are documented on the NCSA HTTP web servers.

A Final comment: When the page loads, the commands are executed, and assuming no errors are encountered, what appears when you view the source is the execution of the SSI not the actual command.


A Useful Example - using both SSI and Tables

The following code: <!--#include file="schedule.html"--> (or <!--#include virtual="schedule.html"--> in the target file is in a different directory) Will insert the file schedule.html below. Again, I point out, simply putting a space between the open delimiter "<--" and the "#" will turn the SSI into a comment.
MY schedule - Fall 2K
. -Monday- -Tuesday- -Wednesday- -Thursday- -Friday-
8:00-8:50 X X X X X
9:00-9:50 Class Class Office Class Class
10:00-10:50 Office - - Office Lrning Cntr.
11:00-11:50 - - - - -
12:00-12:50 R Class R Class R
1:00-1:50 R Class R Class R
2:00-2:50 R R R R R
3:00-3:50 R R R R R
4:00-4:50 R R R R R
R = Research
X = unavailable


Last Modified: Thursday, 16-Nov-00 14:20:58 MST