Internal Links

OK, our next topic involves internal links (both target and destination are in the same HTML file). Such internal links are very useful when you have a larger HTML file and you want to provide a way for users to navigate within that file.

To set up an internal link, you must define both the destination and the target...in that order!. Let's assume you have a large HTML file, and within that file you have an H2 header titled "Installation Instructions." You define that location as an internal destination using the name attribute of the A element as follows:

<A name="Installation"></A><H2>Installation Instructions</H2>

Note that the opening and closing A tags don't contain anything. They simply become a destination for other links.

Now assume elsewhere in the file you have a phrase that says "Go to the installation instructions", and you want to make the text "installation instructions" link to the location named "Installation". You specify an internal link by inserting the number symbol (#) just before the destination name, indicating to the browser that the link is internal:

Go to the <A href="#Installation">installation instructions</A>

When you click on the link "installation instructions" the browser locates the internal destination named "Installation" and displays the HTML file at that specific location.

To see it in action, Click Here. (Note that the coding for Click Here is):

<A href="#Bottom">Click Here.</A>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hey, I'm down at the bottom of this file. Notice it is the SAME HTML file, just a different location. This location is defined by the following (just before the word "Hey", but you don't see it in your browser):

<A name="Bottom"></A>

Use the scroll bar at the right to work your way back up (I could put a link here, but then you wouldn't get the concept as clearly). When you are convinced of the internal link, click the Next button and let's try it out!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2001 Michael J. Doyle
All Rights Reserved.

Designed & Developed by Mike Doyle
using Macromedia Dreamweaver & CourseBuilder

See Mike's Training Schedule for
HTML, Dreamweaver, & CourseBuilder Courses


Email Mike Doyle