LINKSYou use links to:
LINKING TO ANOTHER PAGE ANYWHERE IN THE WORLDOften you see web pages with links to other web pages or websites and these other web pages can be anywhere in the World Wide Web (WWW). Recall in the above section, that the command to link to another web page within your own website is: <A HREF="filename">Click on these words</A> as in: <A HREF="index.htm">Go back to home page</A> where the browser will load the file called "index.htm" when you click on the words "Go back to home page". To link to any page in the world, just replace the file name with the COMPLETE ADDRESS (URL) of the page you want to link to. Remember that you must also enclose the COMPLETE ADDRESS (the URL) of the link with quotation marks. For example, the command <A HREF="http://www.dayspring.com/ecards/">Want to e-mail a greeting card to someone?</A> will link you to a website that lets you send e-mail greeting cards. Try it now in your index.html fileLINKS WITHIN A PAGE - PAGE JUMPTo offer a page jump, you need two items:
<A HREF="#linkname">Click on these words to go to the bookmark</A> Where "linkname" is the name of the section you are jumping or linking to. That is, a section of the web page has been bookmarked with the name "linkname". An example of a page jump is the followingExample code: <H4 ALIGN="CENTER"> If you do not want to use a header tag, then use the paragraph tag as in: <P ALIGN="CENTER"> At the point or place where you want the browser to jump to, you insert the following command: <A NAME="#linkname"></A> For example, at the top of this page (right after the BODY tag), I entered this command: <A NAME="top"></A> LINKING TO ANOTHER PAGE IN YOUR WEBSITELinking to pages within your own website is easy to do. Recall that the basic command for a page jump studied in the last section is: <A HREF="#linkname">Click on these words</A> Well, to link to another page such as to your home page, just replace the #linkname with the name of your file as in: <A HREF="filename.htm">Click on these words</A> For example, if your home page was named index.htm, you could have: <A HREF="index.htm">Go back to home page</A> which will be displayed in the browser as: If you do click on these words, the browser will immediately load your index.html page. To return to this spot, click on the "BACK" button on the menu bar. TARGETING YOUR LINKThe target attribute specifies where to open the linked document. This example will open the linked document in a new browser window or in a new tab: <a href="http://www.mrhamlin.ca/" target="_blank">See Mr. Hamlin's Site</a>
Continue to HTML - Indenting, Lists, and Symbols |