|
| |
Linking to Other Documents Anchor Tag <>
 | Links internal and external Documents
|
 | HTML's single hypertext-related tag is
 | ANCHOR TAG <>
| |
 | An anchor has three main parts
 | < HREF=filename > end of reference
 | SOME TEXT anchor text
 | </A> anchor end
| | | |
 | Here is an sample hypertext reference:
 | < HREF="MaineStats.html"></A>
 | < HREF="AtlanticStates/NJStats.html"> Jersey</A>
| | |
 | Pathnames use the standard UNIX syntax.
|
Notes:

The chief power of HTML comes from its ability to link regions of text (and also images) to another document. The browser highlights these regions (usually with color and/or underlines) to indicate that they are hypertext links (often shortened to hyperlinks or simply links).
HTML's single hypertext-related tag is <>, which stands for anchor. To include an anchor in your document:
Start the anchor with < . (There's a space after the A.)
Specify the document that's being pointed to by entering the parameter HREF="filename" followed by a closing right angle bracket: >
Enter the text that will serve as the hypertext link in the current document.
Enter the ending anchor tag: </A>.
Here is an sample hypertext reference:
< HREF="MaineStats.html"></A>
This entry makes the word ``Maine'' the hyperlink to the document MaineStats.html, which is in the same directory as the first document. You can link to documents in other directories by specifying the relative path from the current document to the linked document. For example, a link to a file NJStats.html located in the subdirectory AtlanticStates would be:
< HREF="AtlanticStates/NJStats.html"> Jersey</A>
These are called relative links. You can also use the absolute pathname of the file if you wish. Pathnames use the standard UNIX syntax.
|