Writing for the Web: A Primer for Librarians
by Eric H. Schnell
|
Hypertext links embedded into Web documents serve several purposes.
Their primary role is to facilitate access to various text-based and multimedia
Internet resources. Links also facilitate navigation between pages of a single
Web document or between resources at a particular site. Hypertext links are
also used to highlight footnotes, provide access to support materials, and to
define words or clarify concepts.
Using HTML, a hypertext link is created using the tag <A HREF >.
The text associated with this tag becomes
the hypertext link to another resource or document, local or remote.
Hypertext links can not only be used to access resources available on the Web,
but also those requiring use of a terminal session, located
on Gopher servers, and utilizing multimedia formats.
The
association between hypertext on a Web page and particular
resource is commonly referred to as a hypertext reference.
The following is an example of how a hypertext reference
is created using HTML:
<A HREF="/eric/papers.html">Eric's Papers</A>
The words Eric's Papers are now associated to
a Web document named papers.html in the directory eric.
When a Web browser encounters this hypertext reference
it highlights the word(s) with a color or
an underline to indicate a reference exists. Clicking on the
words then moves the viewer from the current document to the
new document.
Pathnames
A Pathname refers to the logical directory path and filename which
the browser uses to locate the resource. There are two different types of pathnames
used when creating hypertext links: Relative and Absolute.
The use of a Relative Pathname
assumes the associated resource resides on the same server, in the same directory,
or in a subdirectory relative to document currently being viewed. The information
about access protocol, directory path, etc. is based on the Uniform Resource
Locator (URL) used to reach the current document.
Here is an example of a relative pathname using HTML:
<A HREF="url.html">URL's</A>
There are many advantages to using relative pathnames. Their use
eliminates the need to add
http://bones.med.ohio-state.edu/eric/papers/primer/ to every link.
Since the majority of the references are relative to the table
of contents page webdocs.html, moving this paper to another
site or directory will require little editing. Finally, relative
pathnames are used to navigate readers between
the pages of this document and to and from the glossary.
Absolute Pathnames are used when making reference to documents
which are not directly related. They are most often used when creating references
to resources located elsewhere on a server or throughout the Internet. The entire
directory structure needs to be present for the browser to locate the referenced
document. Here is the same example as above utilizing an absolute pathname:
<A HREF="/eric/papers/primer/url.html">URL's</A>
|