Where to put an anchor?

  powerless 18:50 30 Oct 2005

a name="top"> /a>

I want to put the above in my page to allow the user to click a link to return to the top of the page.

But where do you generally put it? Not before the doctype as I just found out :-(

Just below the meta data?

  Forum Editor 19:25 30 Oct 2005

should be at the beginning of the section that you want linked. In other words, the anchor tag tells the link where to go.

It isn't necessary to have any text or information between the open anchor tag and the close anchor tag by the way.

  powerless 22:13 31 Oct 2005

I don't get that?

The anchor is a place where the link will go to, so how does it know where to go, when there will be no link to it [as there is nothing to link to]?

[errr if that makes sense]

  Forum Editor 23:15 31 Oct 2005

<A HREF=#AnchorName>(here you can put text to describe the link)</A>

Then use this tag to define the place in the HTML document that you want the link to go to:-

<A NAME=AnchorName>(here you can put text at the spot where you want the link to go)</A>

Does that help?

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

Add Depth Of Field to a photo using Tilt Shift Blur in Photoshop

iPhone tips & tricks

Les meilleures tablettes 2017