TechTrain "Just-In-Time" - SEARCH for mini-lessons for busy people!"Step-By-Step" tutorials and lesson modules.TechTrain Home
About TechTrain
Step- By-Step
Just- In-Time Search
Products
Services
Guestbook
Technology Certificates
Graduate Courses
Interactive Internet Email
Communication
FTP (File Transfer Protocol), Telnet, and Gopher
World Wide Web Search
Build Web Pages Create a Simple Page
Create a Second Page
Link to a Web Page
Graphics and Colors on your Web Page
Link to a
Web Page
Linking (Anchor Tag) Linking Lesson
Anchor Tag Lesson
Linking Example

The "anchor" tag includes the URL or Internet address to link to. The format for the "anchor" tag is shown in the area below.

Notice that the anchor tag is more complex than tags used previously. The "anchor" tag is still identified with < and > symbols. However, the A (for anchor) is followed by the URL to be linked to when the "hypertext" is clicked.

Notice the HTML for our second Web page at the bottom of this page. Use this HTML code and redo the file named, "pagetwo.html"

Click on the "View" button to see what your Web page should look like so far.

<A HREF="URL">hypertext</A>
Remember that format for URL is: tool://domainname/path/file

<A HREF="http://www.yahoo.com">Click here for Yahoo</A>
http:// is the tool
www.yahoo.com is the domainname
In this case there is no path or filename.

<A HREF="gopher://gopher.umich.edu> Gopher to University of Michigan</A>
gopher:// is the tool
gopher.umich.edu is the domainname
In this case there is no path or filename.

<A HREF="ftp://ftp.microsoft.com/desktop/wordfile.doc">Download from microsoft</A>
ftp:// is the tool
ftp.microsoft.com is the domainname
desktop is the path
wordfile.doc is the filename.

Link Example
The HTML code shown below includes several anchor tags for hyperlinks.
  1. Open Notepad
    To open Notepad, click on Start | Programs | Accessories | Notepad

  2. Type the following HTML instructions in the Notepad program.

    <HTML>
    <HEAD>
    <TITLE>My Second Web Page</TITLE>
    </HEAD>
    <BODY>
    <H1>Linking</H1>
    <H3>Using the Anchor Tag</H3>
    <OL>

    <LI> <A HREF="formatpage.html"> Format </A> of the Anchor Tag</LI>
    <LI>Uniform Resource Locator <A HREF="urlpage.html"> (URL)</A> </LI>
    <LI>Linking to <A HREF="anotherpage.html"> Another Web Page </A> </LI>

    </OL>

    <A HREF="http://www.yahoo.com">Click here to go to YAHOO! </A>
    Yahoo is an Internet Search Engine.
    Click here to
    <A HREF="ftp://ftp.microsoft.com/deskapps/">download a Microsoft file</A>
    </BODY>
    </HTML>

  3. Save your Notepad file.
  4. Open your Web page in a browser.
  5. Then, click on the "Link Example" link to see if your Web page looks like the example. .
  Top of Page

Anchor Tag Examples

<A HREF="...">Words to Click on</A>

  1. <A HREF="http://www.yahoo.com">YAHOO!</A> results in
    Yahoo!
  2. <A HREF="http://www.whitehouse.gov">WHITEHOUSE</A> results in
    WHITEHOUSE
  3. <A HREF="ftp://ftp.microsoft.com">MICROSOFT</A> results in
    MICROSOFT
  4. <A HREF="http://www.techtrainteam.com/courses/classes.html">TECHTRAIN CLASSES </A> results in
    TECHTRAIN CLASSES
  5. <A HREF="mailto:techtrain@techtrainteam.com">TECHTRAIN EMAIL </A> results in TECHTRAIN EMAIL
  Top of Page

 
TechTrain Home
© Technology Training Team
Please contact us at TechTrainTeam