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:
- 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
- Specifying a URL for a file in a subdirectory:
<A HREF="subdir/filename.html">Text you want user to see</A>
- 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
- 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
- Creation of an email link:
Please <A HREF="mailto:jarek@math.montana.edu">email me</A> with your math questions.
The previous code produces a link that appears as: Please email me
with your math questions.
- 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
- 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.
- 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.
- Include -- this is the one that will insert one HTML file into another.
- Same Directory syntax: <!--#include file="schedule.html"--> Returns: (see below)
- Different Directory syntax: <!--#include virtual="schedule.html"-->
- Config -- changes some server default responses, also sets date formats.
The function of the config command is to "adjust" the server's responses to other
commands. It takes two parts, the config command then the actual server
command. Both must reside inside the same HTML page.
- echo -- The echo command works only with one argument, "var=". However, the argument
takes a wide variety of values. Examples:
- <!--#echo var="LAST_MODIFIED"--> Returns: Thursday, 16-Nov-00 14:20:58 MST
- <!--#echo var="DATE_LOCAL"--> Returns: Thursday, 16-Nov-00 16:23:38 MST
- <!--#echo var="DATE_GMT"--> Returns: Thursday, 16-Nov-00 23:23:38 MST
- <!--#echo var="DOCUMENT_NAME"-->Returns: web_2.html
- <!--#echo var="DOCUMENT_URI"-->Returns: /help/build_pg/web_2.html
- <!--#echo var="REMOTE_ADDR"--> Returns: 153.90.245.11
- <!--#echo var="REMOTE_HOST"--> Returns: newton.math.montana.edu
- <!--#echo var="REMOTE_USER"--> Returns: (none)
- fsize -- returns the size of the stipulated file. Note, the output can be modified by the config command.
Same Directory syntax: <!--#fsize file="web_2.html"--> Returns: 8k
Different Directory syntax: <!--#fsize virtual="../images/isaac.jpg"--> Returns: 68k
- flastmod -- returns the last modified date and time of the stipulated file -- also modified by the config command. (This command does the same job as the echo command's var="LAST_MODIFIED" argument and value.
Same Directory syntax: <!--#flastmod file="web_2.html"--> Returns: Thursday, 16-Nov-00 14:20:58 MST
Different Directory syntax: <!--#flastmod virtual="../images/isaac.jpg"--> Returns: Tuesday, 14-Nov-00 16:05:10 MST
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