Anchor Tags

Now that you've created the text for your categories, you need to locate each heading and mark the heading text in the document using the anchor tag <A>. This tag creates an anchor, text that is specially marked so you can link to it from other points in the document. You assign each anchor its own anchor name, for this exercise, you can use the one word description used in the above exercise or use an abbreviation. Make sure no spaces appear in the word.

Creating anchors:

<A NAME="anchorname">

For example, if you want the text "Gifts for Him" to be an anchor, you could assign it the anchor name "Guy.":

<A NAME="GUY">Gifts for Him</A>

FYI: An anchor doesn't have to be just text. You can also mark an inline image using the same syntax:

<A NAME="IMAGE">IMG SRC="filename.gif"</A>

Locate the H3 heading for your first category. (Example, Gifts for Him) Place the cursor after <H3 ALIGN=CENTER> and type the anchor tag <A NAME="anchorname"> then place your cursor before the </H3> tag and type </A>. Continue creating anchors for the rest of your categories.

After you anchor the text that will be the destination for your links, you need to create the links themselves. For this activity, you want to link the text you entered around your image to the six categories. To create a link to an anchor, you use the same tag you used to create the anchor. The difference is that instead of using the NAME property to define the anchor, you use the HREF property, short for Hypertext Reference, to indicate the location to jump to. For example, to create a link to a location in the current document with the anchor name "Guy," you enter this HTML command:

<A HREF="#GUY">Guy</A>

FYI: To turn an inline image into a hypertext link, place it within link tags, as in:

<A HREF="IMAGE"><IMG SRC="filename.gif">

Return to your text editor. Locate the paragraph tag that contains the six categories nestled within the image file. Within that paragraph you need to bracket each occurrence of a category title with a link tag. Place your cursor in front of your first one word category (example: Guys), and type <A HREF="#onewordcategory" and at the end of the category name add the closing anchor </A>. The link will not work if you leave the # out. Your code should look similar to the following:

<A HREF="#Guys">Guys</A>

Save your word document and reload it in your browser. Check to see if your link works.

Just Plain Stupid