I’ve tried all of the following:
<a name="test"></a>
<a id="test"></a>
<h4 id="test">SOME TEXT</h4>
And then linking to them like this:
<a href="pagename#test">
All of the above work with Firefox, IE and Chrome, but none of them worked with Safari 5.xx on a mac. Any help is very much appreciated.
<a href="#test">Go to Test</a>
.
.
.
<div id="test">This is Test.</div>
This should work.
EDITED:
Also, if you want to link to a particular id in a different page, which I think you do, use:
<a href="somepage.html#test">Go to Test on some different page.</a>
Looks like you have a misunderstanding of how anchors work, you need to use the
href
attribute.To link to the
<h4 id="test">
element do this (if target on the same page):If target on a different page: