logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Women's Issues
Teaching LDS
Relationships
Action Movies
Twins


dailyclick
All times in EST

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

The HTML Anchor Tag - The Jump Link - 2
Guest Author - Diane Cipollo

Continuing with the "back to top" example, the code that is at the bottom of the page would look like this.

<a href="#top">Back to Top</a>


The addition of the # is what makes this link behave differently from the other links we have discussed in part one of this tutorial. It tells the browser to look for something on the webpage and that something is what comes after the #. In this case it is top. It does not have to be top. You can use whatever you like for the identifier. It is the physical placement of the code that makes this work.

Now the browser has been told to look for the top identifier. So we need to put this at the location on the webpage that we want the browser to jump to. If you want the browser to go to the very top of the webpage, then you would put the identifier just below the <body> tag. If you want the browser to go to the top of a list, then you would put the identifier at the top of that list. OK, here is the code to place in that special location on the webpage.

<a name="top"> </a>


If you do not put anything between the opening and closing tags (<a> </a>), as in the above example, this will work as an invisible link. Nothing will show on the computer screen. If you are using this as a link to the top of the webpage, you would probably not want to put anything between these opening and closing tags. However, if this is a jump to the top of a list, you would probably put the title of the list between the tags.

Are you asking yourself if it is possible to go to a new webpage and jump to a special location on that page with one link. Yes. You would do this by placing the link with the href attribute and the #identifier on the referring page and the link with the name attribute and identifier will go on the new page at the special location. You can have many jump tags on one webpage. Just remember that it is the matching identifiers that tell the browser which special location to jump to.

← Back

|



RSS | Previous Features | Site Map


Content copyright © 2008 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

Digg! g delicious Save to Del.icio.us

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
Multiple-Choice Input Fields for HTML Forms

The Right Way to Start a Paid Website Project

Text Input Options for HTML Forms

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2008 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor