|
In your homepage or in most other
documents you also want to have some links to some other documents that can be
activated by the user. |
|
In order to make a relative link to another document, the most common
link, you must usually have another HTML document at your disposal. |
|
|
Alternatively, you can have links to documents
that are not in the HTML format, but then you do not know if the user
has the software to open the document. Besides HTML, only .pdf
documents make some sense. |
|
Most important: |
|
|
You must have the document in a
file that has a fixed relation that must
never change to the file that contains your
document! |
|
It is important to be aware of the
fact that your HTML documents will be of no use to others as long as
they are in your PC. If they are to be accessible via the Internet, they
must be transferred to a server. |
|
|
Links therefore, in the final version, are either
from one document to another document within one and the same server, or from one server
to another server. If you give file names that are specific for your PC,
but not for the server, your links will work perfectly well for you within your
PC, but not for the rest of the world which can only access the
server. |
|
As
with images, we can set relative or absolute links. Relative links should be preferred
whenever possible. |
|
How do you set a document link? It is
easy: |
|
|
Mark the word or sentence you want to carry the
link. Press the "Anchor" key (the globe
symbol with the arrows that look like a paper clip). A menu pops up. |
|
|
Again, you can enter the precise address, or,
much better, use the "choose file" function. As before, you find your
file system; click through it until you find the HTML document you want.
Click on it. |
|
|
Then click on "öffnen" and finally on "OK". Your link is established. |
|
Try it - you may use anything (just
don't forget to erase it later on). |
|
The string carrying the link now
appears within a <A></A> (for "Anchor") tag. In the browser, the words
carrying a link are usually blue and underlined. |
|
As with any tag, you may put your
cursor inside and press F6 to see what attributes come up. It is quite a
large number, but at this stage we need only a few: |
|
|
The top line (
HREF for HTML reference) gives the address of the document
you want the link to. You may check if is is correct or change it either by
directly writing in what you want or by clicking on the left-hand button in the
HREF line (you may have to click in the
HREF line first for the button to appear). Again you get your
file system and you may look for the document of your choice. |
|
|
The next line is "NAME". This carries very important
functions that we are going to look at in the next subchapter. |
|
|
|