Linking
CSc 302 Outlines
Starting XHTML
Images
Links take you
somewhere else
.
On another server
.
In the same directory
.
In a
different directory on the same server
.
A different place in
the same document
.
A specific place in
a different document
.
Anchor
<a href="
url
">
Highlighted Text
</a>
The
Highlighted Text
is usually shown
underlined in blue
.
Click to go.
Types of URLs.
Absolute:
http://www-1.ibm.com/linux/
Relative.
Files in the same directory.
name.html
Files one directory down.
directory/name.html
.
The web uses forward slash,
/
,
not backward slash,
\
.
Files in the parent directory.
../name.html
.
Up and down:
../../masonry/bricks/firebrick.html
.
Server relative:
/files/goodfiles/greatfiles/wonderful.html
Internal links.
Start with
#
:
<a href="#clunk">Proceed</a>
Specify the location:
<a id="clunk" name="bottom">
The
id
is scheduled to replace
name
.
Link to a location in another document.
<a href="somewhere.html#clunk">Go</a>
.
Mailto URLS:
mailto:fred@someplace.com
. Starts the mailer.
This is just here to
take up space
The End
Starting XHTML
Images