2 Replies - 1593 Views - Last Post: 23 April 2008 - 06:23 AM

#1 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 207
  • View blog
  • Posts: 4,812
  • Joined: 23-December 05

Link within a Page

Posted 25 November 2006 - 10:26 AM

Description: include the tags and # in your linksAllows a link to point within the same page eg: "To Top"Example Link:
<a href="#item">go to Item</a>



for the header of item, so this actually points there:
<a name="item">The Item</a>


<!-- the # symbol tells the html interpreter to look within the current document first -->

Is This A Good Question/Topic? 0
  • +

Replies To: Link within a Page

#2 srtech  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 29-August 06

Re: Link within a Page

Posted 21 April 2008 - 07:00 PM

This is the traditional way. However, a better way is simply us the ID attribute of an element. For example.
go to Item

will jump to any object with a unique id of "item" like this
My Content

Was This Post Helpful? 0
  • +
  • -

#3 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 207
  • View blog
  • Posts: 4,812
  • Joined: 23-December 05

Re: Link within a Page

Posted 23 April 2008 - 06:23 AM

A good point, but if you plan to support all versions of IE and FF, it would be a good idea to use both. Older versions of IE tended to use the name attribute for all such interactions (including DOM manipulation), while it appears that FF has no plan on changing from the id attribute.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1