Hypertext Links
Links to a Different PageWriting links is more complicated than any of the other tags I have already shown you. It may seem complicated to you at first, but after you use it a few times you will easily remember what to type. Here are the steps required to make a link, with this example linking to "HTML for People Who Want to Learn":
How the anchor tag looks in one piece<A HREF="http://geocities.datacellar.net/SiliconValley/Vista/2823/">HTML for People Who Want to Learn</A>
How it will look on your page:HTML for People Who Want to Learn
When you make a link to a page that is in the same directory, you can type just the file name of the page instead of the full URL. For example, when I link back to the starting page of this site, this is what I type: <A HREF="index.html">Home</A> And it looks as if I had typed the complete URL: Home
Remember that file names are case sensitive. If you have a page "MyPage.html" and try to link to it as "mypage.html", that link will not work. You must link to it as "MyPage.html". To help keep things straight, try to keep all file names in lower case. |
Links Within the Same PageIf you want to put a link to a specific section on the same page, you use a named anchor, also known as a local hyperlink. To use a named anchor, you name the section that you want the link to go to, and then you put a reference (link) to the section. When this link is activated, the named section will appear at the top of the browser window.
Naming the sectionGo to the section and put an anchor around the section heading giving it a name: <A NAME="sp">Links Within the Same Page</A>
Linking to the named sectionTo make a link to the named section, write this: <A HREF="#sp">Links Within the Same Page</A>.
Linking to a target on another pageIf you want to make a link to a specific section that is on a different page, include the URL (or just the file name if in the same directory) in the anchor. <A HREF="htmlchp3.html#sp"> or
And this is how it will look on your page:To learn how to make links within a page, please go to the section named Links Within the Same Page. Go ahead and click on it. Then scroll back down to read how to make a link to an e-mail address.
Links to E-mail Addresses
|
Last Modified: Friday, 17-Jul-98 18:28:26 PDT
Page URL: http://geocities.datacellar.net/SiliconValley/Vista/2823/htmlchp3.html