Web Design Table of Contents by Arnold Kling
Creating Links Between Pages

The core dynamic capability of the World Wide Web is the ability to link across pages. When a user clicks on a hypertext link, they go to a different page on your site, or to another site completely. Every user can choose to take a different path through the Web.

Internal Links

In this exercise, we will create links between two of our own pages. These are called internal links. We will have two instances of notepad open. Feel free to use copy/paste (ctrl-c and ctrl-v) to save on typing.

  1. Open up two instances of notepad.
  2. In the first notepad window, enter the following code:
    <html>
    <head>
    <title>
    Page One
    </title>
    </head>
    <body>
    <p> This is the first page. It links to the <a href = "second.html">second page</a>. </p>
    </body>
    </html>

  3. Now, save this file as first.html

  4. Toggle to your other notepad window. Enter the following code.

    <html>
    <head>
    <title>
    Page Two
    </title>
    </head>
    <body>
    <p> This is the second page. </p>
    </body>
    </html>
  5. Now, save this file as second.html

  6. Next, in your browser, open up first.html

  7. You should see a link to the second page. Test the link. If you typed correctly, the link should work.

Here are some things to think about and to try.

External Links

In this section, we create links to pages on someone else's web site. To do this, we copy the URL (Uniform Resource Locator) from the Web address box near the top of the browser.

  1. Let us create a link to this page on arnoldkling.com from your first page. Start by clicking your mouse into the address box near the top of this page and doing an edit/copy by typing ctrl-c.

  2. Next, in notepad, open up first.html. Now, type
    <a href = "" title = "Arnold Kling How to Link">Go to the link page</a> on arnoldkling.com.

  3. We left the link blank. To fill it in, put your mouse cursor in between the "" and paste in the link by byping ctrl-v. The code now should say
    <a href = "http://arnoldkling.com/webdesign/htdocs/links.html" title = "Arnold Kling How to Link">Go to the link page</a> on arnoldkling.com. Use your browser to test this external link.

Remarks:

Page created by Arnold Kling. Last Modified July 18, 2001.