471,078 Members | 816 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,078 software developers and data experts.

Inserting a HTML anchor?

Hi all,
I have a two page web site and im trying to set it up so that when you
click a link on my link bar, it will take you to my products page. However,
depending on what link you click on the link bar, I want it to take you to
the specific location on the products page.
I know the the html anchor attribute will do it, But I find it a little
confusing.
Anyone have any tips or tricks to make it understandable?
Thanks for your time,
Mike Pratz
Jul 20 '05 #1
1 5335
Arthur Pratz wrote:
depending on what link you click on the link bar, I want it to take you
to the specific location on the products page. I know the the html anchor attribute will do it, But I find it a little
confusing.


I would too. There is no such thing as an anchor attribute in HTML. There is
an achor tag which has a name attribute if you want to do the old style,
but new style lets you create a fragment identifier with the id attribute
on any element.

e.g.

<h2 id="myproduct">My Product</h2>

Then you can link href="page.html#myproduct"
--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by httpmart | last post: by
1 post views Thread by teranetsecurity | last post: by
6 posts views Thread by Christoph Söllner | last post: by
3 posts views Thread by Tommy DN | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.