How do I embed a "top of page" marker in my page

  • Thread starter Thread starter Sherry
  • Start date Start date
S

Sherry

I have a lot of information on the page and want to embed a "top of page"
where I break the blog days and have a market go click to get back to the top
of the page.
 
In the code view, type this at the point(s) where you wan the link:

<a href="#top">Top of Page</a>.

You can also do this as an image/button if you like:

<a href="#top"><img src="images/top.gif"></a>

Not sure about the form button version of this.




"break the blog days" and "have a market go click....." - what is meant by
those statements.....?
 
In order for the below to work you need to add the following at the top of
your page just below the <body> tag:
<a name="top"></a>
because the link needs a reference point on your page.

For a form you would use the same method. Put it just above the start of
your form i.e.
<a name="formtop"></a>
Then the link would be: <a href="#formtop">Top of Form</a>
 
Larry said:
In order for the below to work you need to add the following at the top of
your page just below the <body> tag:
<a name="top"></a>
because the link needs a reference point on your page.

Actually, this is also what I thought. But it still works without a
reference point
 
I've had the "top" link work without an anchor tag. However some browsers
require it but others don't.

Just tested:

Firefox 3.0.1 requires <a name="top>

Opera 9.51,
IE 7.0, and
Safari 3.1.2 all work without <a name="top">.
 
would it not be easier to just do
<a href="#">go to top</a>
then you don't need an anchor tag atall

Cheers,
Jon
 
Back
Top