|
Links
A lot of people think that the internet and making web
pages is a hard concept to understand and best left not understanding. I've
set out to prove those people wrong, and a good bit of proof is the fact
that links in web pages are so easy to put in.
Hyperlinks, or links for short, are just bits of text or images that
when clicked on lead to another page. The code for a hyperlink is as follows:
<A HREF="mypage.htm"> the text or image call up command that you
want to lead to the next page is put here </A>
You can use hyperlinks to connect your page to other people's if you want,
just type in the URL (Internet address) instead of "mypage.htm", eg <A
HREF="http://www.maytrix.base.org"> Maytrix Universe </A>.
There are also things called anchors within web pages.
These are used to mark a point in the page so that it can be easily got
to by clicking a link. They don't affect the look of the page, but are
very useful. The way to specify an anchor is as follows:
<A NAME="anynameyouwant">Text and
other elements of the page at the point you want the anchor to be at.
Note that this tag does not need closing. To link to it, use the same
format as normal, but a hash (#) after the page name and then the name
of the anchor. For example, if I wanted to link to a page called help.html
which contained an anchor called "top" I would use the following
code:
<A HREF="help.html#top">
Anchors are particularly useful in long pages where a user might want
to get to a certain section a long way down without having to scroll.
You can use anchor links within the page as follows:
<A HREF="#top">
This would link to an anchor in the same page.
O.K., so here is the command incorporated in a real page:
<HTML>
<HEAD><TITLE>Iceman's Web Page</TITLE></HEAD>
<BODY TEXT="#000000" ALINK="#FFFF00" VLINK="#8080FF" LINK="#0000FF"
BACKGROUND="greyweave.gif">
<H1>This is a heading of size 1</H1><BR>
<FONT COLOR="#FFFF00"><H1>This is a heading of size 1
in a different colour (yellow) </H1></FONT><P ALIGN="RIGHT"
ID="ice_verdanaHead">
<FONT SIZE=+2 FACE="Verdana">This is text of font size +2 and
in the Verdana Font, Aligned on the Right</FONT></P>
<!-- This is a comment, it won't appear in the browser, but is useful
when looking at source code. -->
<A HREF="mypage.htm"> This is a
hyperlink to mypage.htm (Don't Click This!!)</A><BR>
<A NAME="middle">This is an anchor: you can't see anything
though!
</BODY>
</HTML>
Click to see the Resulting Page
There you go, now you can put links to other pages in your page (providing
they already exist!!)
|
|